Gatsby Netlify CMS build failing

Hi i have been using gatsby for a while but for some reason in the past few weeks my build keeps failing:

node version 12

10:09:21 PM: error “gatsby-plugin-netlify-cms” threw an error while running the onCreateWebpackConfig lifecycle:
10:09:21 PM: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
10:09:21 PM: ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
10:09:21 PM: $kaldi-red: #D64000
10:09:21 PM: ^
10:09:21 PM: Media query expression must begin with ‘(’
10:09:21 PM: in /opt/build/repo/src/components/all.sass (line 5, column 1)
10:09:21 PM: at /opt/build/repo/node_modules/webpack/lib/NormalModule.js:316:20
10:09:21 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:367:11
10:09:21 PM: at /opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:233:18
10:09:21 PM: at context.callback (/opt/build/repo/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
10:09:21 PM: at Object.callback (/opt/build/repo/node_modules/sass-loader/dist/index.js:89:7)
10:09:21 PM: at Object.done [as callback] (/opt/build/repo/node_modules/neo-async/async.js:8069:18)
10:09:21 PM: at options.error (/opt/build/repo/node_modules/node-sass/lib/index.js:294:32)
10:09:21 PM:
10:09:21 PM:
10:09:21 PM: ModuleBuildError: Module build failed (from ./node_modules/mini-css-extract-pl ugin/dist/loader.js):
10:09:21 PM: ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cj s.js):
10:09:21 PM: $kaldi-red: #D64000
10:09:21 PM: ^
10:09:21 PM: Media query expression must begin with ‘(’
10:09:21 PM: in /opt/build/repo/src/components/all.sass (line 5, column 1)

It mentions a problem with your .sass file.

Try fixing it.

Try to move ‘gatsby-plugin-sass’ plugin in ‘gatsby-config.js’ to the top.
Second option is described here: Issue with sass · Issue #646 · netlify-templates/gatsby-starter-netlify-cms · GitHub