Я создаю и настраиваю webpack.config.js
module.exports = {
entry: './src/app/index.js',
output: {
path: __dirname + '/src/public',
filename: 'bundle.js'
}
};
И в моем package.json
"scripts": {
"webpack": "webpack --mode development"
}
Но в консоли показывается эта ошибка:
ERROR in ./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\marle\Desktop\mern-stack\node_modules\destroy'
@ ./node_modules/destroy/index.js 14:17-30
@ ./node_modules/send/index.js
@ ./node_modules/express/lib/response.js
@ ./node_modules/express/lib/express.js
@ ./node_modules/express/index.js
@ ./src/index.js
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! mern-stack@1.0.0 webpack: `webpack --mode development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the mern-stack@1.0.0 webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\marle\AppData\Roaming\npm-cache\_logs\2019-10-29T23_50_32_004Z-debug.log
Моя версия webpack 4.41.2 и webpack-cli 3.3.9