Module not found: Error can't resolve 'child_process', how to fix?
just put in package.json
"browser":{
"child_process": false
}
are you using webpack
I got a similar error while trying to run storybook.js
which uses webpack.
For Webpack
You can add the following to the webpack's config to fix the build -
// webpack.config.js
...,
node: {
child_process: "empty"
// fs: "empty", // if unable to resolve "fs"
},
You can also set other conflicting modules to "empty"
if they are responsible for breaking the build.
Reference for Webpack's config.node