This might be totally my fault, but I cannot find the solution for this issue: I have an Angular project, where I use custom-webpack and the license-checker-webpack-plugin. After upgrading to version 11.1.1 I get the following error:
An unhandled exception occurred: Cannot find module 'webpack'
Require stack:
- /build/UI/node_modules/license-checker-webpack-plugin/src/index.js
- /build/UI/webpack.config.js
- /build/UI/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js
...
my webpack.config.js is the following:
const LicenseCheckerWebpackPlugin = require('license-checker-webpack-plugin');
module.exports = {
plugins: [
new LicenseCheckerWebpackPlugin({
outputFilename: '../open_source.txt',
allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR 0BSD)',
}),
],
};
How can I solve this?
Probably a damaged lock file. Would you mind trying to delete it (and node_modules) and regenerate by running npm install again?
yeah, that's it. Thanks a lot :)
Most helpful comment
Probably a damaged lock file. Would you mind trying to delete it (and
node_modules) and regenerate by runningnpm installagain?