React-Static : Error while building the static site for production

I am doing a proof of concept for the static site building by react-static. I just have some basic setup mostly defaults (basic template) of react-static.

The only thing added extra into the basic is react-static-plugin-sass

Here is my static.config.js file

`
import path from ‘path’;

export default {
plugins: [
‘react-static-plugin-sass’,
[
require.resolve(‘react-static-plugin-source-filesystem’),
{
location: path.resolve(’./src/pages’),
},
],
require.resolve(‘react-static-plugin-reach-router’),
require.resolve(‘react-static-plugin-sitemap’),
],
};
`

The site is working perfectly locally and also getting served locally after building. No issues there.

But when I try to build the production version of the site by:

react-static build --staging

The following errors are happening:

`
Importing directory routes from: /Users/shalsing/repos/personal-projects/law-firm/src/pages/**/*.{js,jsx}
{ has404: true }
[✓] Routes Built (0.3s)
Building Templates…
[✓] Templates Built
Copying public directory…
[✓] Public directory copied (0.4s)
Bundling App…
Error: No module factory available for dependency type: CssDependency
at addDependency (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:800:12)
at iterationOfArrayCallback (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:208:3)
at addDependenciesBlock (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:816:5)
at Compilation.processModuleDependencies (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:827:4)
at afterBuild (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:954:15)
at buildModule.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:998:11)
at callback (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:734:5)
at module.build.error (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:782:12)
at handleParseResult (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/NormalModule.js:478:12)
at doBuild.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/NormalModule.js:500:6)
at runLoaders (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/NormalModule.js:358:12)
at /Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at /Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/loader-runner/lib/LoaderRunner.js:186:6
at context.callback (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at childCompiler.runAsChild (/Users/shalsing/repos/personal-projects/law-firm/node_modules/extract-css-chunks-webpack-plugin/dist/loader.js:199:12)
at compile (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compiler.js:343:11)
at hooks.afterCompile.callAsync.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compiler.js:681:15)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at AsyncSeriesHook.lazyCompileHook (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/Hook.js:154:20)
at compilation.seal.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compiler.js:678:31)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/Hook.js:154:20)
at hooks.optimizeAssets.callAsync.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:1423:35)
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1)
at AsyncSeriesHook.lazyCompileHook (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/Hook.js:154:20)
at hooks.optimizeChunkAssets.callAsync.err (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/webpack/lib/Compilation.js:1414:32)
at _promise1.then._result1 (eval at create (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/tapable/lib/HookCodeFactory.js:33:10), :14:1)
at process._tickCallback (internal/process/next_tick.js:68:7)
/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/neo-async/async.js:16
throw new Error(‘Callback was already called.’);
^

Error: Callback was already called.
at throwError (/Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/neo-async/async.js:16:11)
at /Users/shalsing/.nvm/versions/node/v10.16.3/lib/node_modules/react-static/node_modules/neo-async/async.js:2818:7
at process._tickCallback (internal/process/next_tick.js:61:11)

`

PLEASE HELP. Stuck with it from last 2 days.

Thanks in advance…