Hi There,
I followed the tutorial (thanks!) and everything worked fine on Angular 9. Then I had to upgrade to Angular 12 and now I am getting the following error:
⠋ Generating browser application bundles (phase: setup)...An unhandled exception occurred: Cannot read property 'find' of undefined
See "/private/var/folders/v9/gc1077ds5g5gktxq58kzyzj00000gn/T/ng-k0haHV/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! myapp@0.0.0 build: `ng build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the myapp@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
angular-errors.log:
[error] TypeError: Cannot read property 'find' of undefined
at module.exports (/source/myapp/extra-webpack.config.js:9:40)
at Function.<anonymous> (/source/myapp/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js:31:24)
at Generator.next (<anonymous>)
at /source/myapp/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js:8:71
at new Promise (<anonymous>)
at __awaiter (/source/myapp/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js:4:12)
at Function.buildWebpackConfig (/source/myapp/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js:19:16)
at /source/myapp/node_modules/@angular-builders/custom-webpack/dist/transform-factories.js:17:58
at initialize (/source/myapp/node_modules/@angular-devkit/build-angular/src/browser/index.js:83:35)
at async SwitchMapSubscriber.project (/source/myapp/node_modules/@angular-devkit/build-angular/src/browser/index.js:114:17)
Seems the config structure is different from the previous version and the module.rules property is missing now.
Any Idea?
Hi There,
I followed the tutorial (thanks!) and everything worked fine on Angular 9. Then I had to upgrade to Angular 12 and now I am getting the following error:
angular-errors.log:
Seems the
configstructure is different from the previous version and themodule.rulesproperty is missing now.Any Idea?