Closed MHacker9404 closed 3 years ago
Working on upgrading an AngularJS app to Angular 11 - get the above error on build: package.json "@angular/common": "^11.0.2", "@angular/compiler": "^11.0.2", "@angular/core": "^11.0.2", "@angular/forms": "^11.0.2", "@angular/platform-browser": "^11.0.2", "@angular/platform-browser-dynamic": "^11.0.2", "@angular/router": "^11.0.2", "@angular/upgrade": "^11.0.2", angular.json "architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./webpack.config.js" }, "outputPath": "./dist", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "aot": true, "assets": ["src/favicon.ico", "src/assets"], "styles": ["src/styles.scss"], "scripts": [] }, webpack.config.js const webpack = require('webpack'); module.exports = { module: {}, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery', _: 'underscore', 'window._': 'underscore', }), ], }; call stack: Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead) at ProvidedDependency.set (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\webpack\lib\Dependency.js:226:9) at iterationDependencies (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\Compilation.js:940:21) at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\Compilation.js:950:8 at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:409:6 at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:155:13 at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\tapable\lib\HookCodeFactory.js:33:10), :18:1) at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:138:29 at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:346:9 at processTicksAndRejections (internal/process/task_queues.js:75:11)
"@angular/common": "^11.0.2", "@angular/compiler": "^11.0.2", "@angular/core": "^11.0.2", "@angular/forms": "^11.0.2", "@angular/platform-browser": "^11.0.2", "@angular/platform-browser-dynamic": "^11.0.2", "@angular/router": "^11.0.2", "@angular/upgrade": "^11.0.2",
"architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./webpack.config.js" }, "outputPath": "./dist", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "aot": true, "assets": ["src/favicon.ico", "src/assets"], "styles": ["src/styles.scss"], "scripts": [] },
const webpack = require('webpack'); module.exports = { module: {}, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery', _: 'underscore', 'window._': 'underscore', }), ], };
Please update the issue according to the issue template.
Working on upgrading an AngularJS app to Angular 11 - get the above error on build: package.json:18:1)
at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:138:29
at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:346:9
at processTicksAndRejections (internal/process/task_queues.js:75:11)
"@angular/common": "^11.0.2", "@angular/compiler": "^11.0.2", "@angular/core": "^11.0.2", "@angular/forms": "^11.0.2", "@angular/platform-browser": "^11.0.2", "@angular/platform-browser-dynamic": "^11.0.2", "@angular/router": "^11.0.2", "@angular/upgrade": "^11.0.2",
angular.json"architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./webpack.config.js" }, "outputPath": "./dist", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "aot": true, "assets": ["src/favicon.ico", "src/assets"], "styles": ["src/styles.scss"], "scripts": [] },
webpack.config.jsconst webpack = require('webpack'); module.exports = { module: {}, plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery', _: 'underscore', 'window._': 'underscore', }), ], };
call stack: Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead) at ProvidedDependency.set (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\webpack\lib\Dependency.js:226:9) at iterationDependencies (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\Compilation.js:940:21) at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\Compilation.js:950:8 at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:409:6 at C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\@angular-builders\custom-webpack\node_modules\webpack\lib\NormalModuleFactory.js:155:13 at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\repos\CloudKey\cif-33\CloudKey\client\node_modules\tapable\lib\HookCodeFactory.js:33:10),