question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to Webpack 2.3.x

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [x] feature request

Versions.

Angular CLI 1.0.0

Desired functionality.

Any plans/timeframe to upgrade to Webpack 2.3.x? Tried locking the version but compilation fails with a bunch of errors. I guess Webpack’s internal apis changed (even though they shouldn’t since it is a minor version bump):

13% building modules 30/54 modules 24 active ...ugo/pix4d/spa/node_modules/url/url.jsError: No module factory available for dependency type: ContextElementDependency
    at Compilation.addModuleDependencies (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:206:21)
    at Compilation.processModuleDependencies (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:195:8)
    at _this.buildModule.err (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:335:13)
    at building.forEach.cb (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:140:27)
    at Array.forEach (native)
    at callback (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:140:13)
    at module.build (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:167:11)
    at ContextModule.<anonymous> (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:118:3)
    at ContextModule.result.resolveDependencies (/home/hugo/pix4d/spa/node_modules/@ngtools/webpack/src/plugin.js:228:25)
    at ContextModule.build (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/ContextModule.js:99:7)
    at Compilation.buildModule (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:142:10)
    at factoryCallback (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:324:11)
    at /home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/ContextModuleFactory.js:96:12
    at /home/hugo/pix4d/spa/node_modules/tapable/lib/Tapable.js:204:11
    at done.then (/home/hugo/pix4d/spa/node_modules/@ngtools/webpack/src/plugin.js:230:28)
 28% building modules 156/191 modules 35 active ...ode_modules/webpack/buildin/global.js/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:264
				if(_this.profile) {
				        ^

TypeError: Cannot read property 'profile' of null
    at factoryCallback (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/Compilation.js:264:13)
    at /home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:242:4
    at /home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:93:13
    at /home/hugo/pix4d/spa/node_modules/tapable/lib/Tapable.js:204:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/home/hugo/pix4d/spa/node_modules/tapable/lib/Tapable.js:208:13)
    at onDoneResolving (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:68:11)
    at onDoneResolving (/home/hugo/pix4d/spa/node_modules/@angular/cli/node_modules/webpack/lib/NormalModuleFactory.js:189:6)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ceoaliongroocommented, Jul 31, 2017

That same error when have with the installation with webpack: ^3.4.11 as dev dependencies in the project.

packages.json

{
  "name": "dashboard-fwa",
  "version": "0.2.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.3.2",
    "@angular/common": "^4.3.2",
    "@angular/compiler": "^4.3.2",
    "@angular/core": "^4.3.2",
    "@angular/forms": "^4.3.2",
    "@angular/http": "^4.3.2",
    "@angular/platform-browser": "^4.3.2",
    "@angular/platform-browser-dynamic": "^4.3.2",
    "@angular/router": "^4.3.2",
    "@swimlane/ngx-datatable": "^9.3.1",
    "bootstrap": "^4.0.0-alpha.6",
    "chart.js": "^2.6.0",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "ng2-charts": "^1.6.0",
    "ngx-bootstrap": "^1.8.1",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.16"
  },
  "devDependencies": {
    "@angular/cli": "^1.2.6",
    "@angular/compiler-cli": "^4.3.2",
    "@ngtools/json-schema": "^1.1.0",
    "@types/jasmine": "^2.5.53",
    "@types/node": "^8.0.17",
    "codelyzer": "^3.1.2",
    "jasmine-core": "^2.7.0",
    "jasmine-spec-reporter": "^4.1.1",
    "karma": "^1.7.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.3.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^5.1.2",
    "ts-node": "^3.3.0",
    "tslint": "^5.5.0",
    "typescript": "^2.4.2",
    "webpack": "^3.4.1",
    "webpack-dev-middleware": "^1.11.0",
    "webpack-dev-server": "^2.6.1"
  }
}
D:\Dev\WEB\MetricsMonitorClient\dashboard>npm ls webpack
dashboard-fwa@0.2.0 D:\Dev\WEB\MetricsMonitorClient\dashboard
`-- webpack@3.4.1

@angular/cli@1.2.6 by default installed webpack: ˆ2.4.1 i want to use the version ˆ3.4.1

D:\Dev\WEB\MetricsMonitorClient\dashboard>npm ls -g webpack
C:\Users\carlosm\AppData\Roaming\npm
`-- @angular/cli@1.2.6
  `-- webpack@2.4.1

i understood maybe the issue is because a conflict between the global and local versions of webpack.

How is possible to indicate the @angular/cli the webpack version to install? How i can use lazy load routes, with the last version of webpack?

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

To v2 or v3 from v1 - webpack
The new naming conventions are easier to understand and are a good reason to upgrade the configuration to using module.rules .
Read more >
webpack - npm
The README reflects webpack v2.x, webpack v1.x documentation can be found here. webpack is a bundler for modules.
Read more >
Migrating to Webpack 2: some tips and gotchas | Swizec Teller
When you upgrade to Webpack 2.2.rc.x, you fall into a small dependency hell with extract-text-webpack-plugin . The released version depends ...
Read more >
terser-webpack-plugin | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
node.js - Webpack issue when update 4.x to 5.x - Stack Overflow
I found the error. WebPack Hot Client is not update for the last version of webpack (5.x) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found