Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

feat(build): upgrade to v6 #574

Merged
merged 2 commits into from
May 3, 2018
Merged

feat(build): upgrade to v6 #574

merged 2 commits into from
May 3, 2018

Conversation

Toxicable
Copy link

@Toxicable Toxicable commented Apr 14, 2018

Includes the minimal changes required to upgrade to v6.

Don't merge till v6 final - will be updated at that point.

@peterbakonyi05
Copy link
Contributor

peterbakonyi05 commented Apr 22, 2018

I know it is not final, just in case someone else tries to update based on this PR like I did. When running npm i and then npm start:

** Angular Live Development Server is listening on localhost: 4200, open your browser on http://localhost:4200/ **
 13% building modules 31/35 modules 4 active …\@nguniversal\common\esm5\common.es5.js✖ 「wdm」: Error: No module factory available for dependency type: ContextElementDependency
    at addDependency (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:406:12)
    at iterationOfArrayCallback (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:88:3)
    at addDependenciesBlock (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:422:5)
    at iterationOfArrayCallback (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:88:3)
    at addDependenciesBlock (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:425:5)
    at Compilation.processModuleDependencies (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:433:4)
    at afterBuild (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:560:16)
    at _this.buildModule.err (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:606:11)
    at callback (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:357:35)
    at module.build.error (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:393:12)
    at resolveDependencies (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\ContextModule.js:219:4)
    at ContextModule.result.resolveDependencies (C:\Github\universal-starter\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:475:25)
    at ContextModule.build (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\ContextModule.js:148:8)
    at Compilation.buildModule (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:361:10)
    at factory.create (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\Compilation.js:587:15)
    at hooks.afterResolve.callAsync (C:\Github\universal-starter\node_modules\@angular-devkit\build-angular\node_modules\webpack\lib\ContextModuleFactory.js:150:16)
C:\Github\universal-starter\node_modules\neo-async\async.js:14
    throw new Error('Callback was already called.');
    ^

Error: Callback was already called.

I think the problem is that webpack ^4.5.0 should be removed from package.json because it will install webpack twice (4.6.0 in the root and 4.5.0 in node_modules/@angular-devkit/build-angular), which is the root cause of this problem

@Toxicable
Copy link
Author

@peterbakonyi05 It works fine for me, however I am using yarn instead, could you give that a shot?

@peterbakonyi05
Copy link
Contributor

@Toxicable Finnaly had some time to check. If I install using yarn it works fine. When running npm ls webpack after yarn install:

$ npm ls webpack
[email protected] C:\Github\universal-starter
+-- @angular-devkit/[email protected]
| `-- [email protected]  deduped
`-- [email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants