Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use custom-webpack:dev-server with angular 9.1.0 #708

Closed
kamilchlebek opened this issue Mar 27, 2020 · 4 comments · Fixed by #709
Closed

Can't use custom-webpack:dev-server with angular 9.1.0 #708

kamilchlebek opened this issue Mar 27, 2020 · 4 comments · Fixed by #709

Comments

@kamilchlebek
Copy link
Contributor

Describe the Bug

  • builder is set to @angular-builders/custom-webpack:dev-server

Running ng serve ends up with message:

ERROR in Cannot read property 'flags' of undefined

After debugging ng serve I can see it comes from method checkUnreachable inside typescript internals. It throws an exception while parsing node_modules/@angular-builders/custom-webpack/node_modules/typescript/lib/typescript.js

My guess it's because of @angular-devkit version mismatch after upgrading to 9.1.0.

  • Deleting directory node_modules/@angular-builders/custom-webpack/node_modules/@angular-devkit fixes the issue - forces node to use @angular-devkit from node_modules

  • Switching to default builder fixes the issue

Minimal Reproduction

https://github.com/kamilchlebek/angular-builders-issue-demo

Steps:

  1. ng serve ➡️ error

Expected Behavior

ng serve finishes successfully.

Environment

Angular CLI: 9.1.0
Node: 10.16.0
OS: linux x64

Angular: 9.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.0
@angular-devkit/build-angular     0.901.0
@angular-devkit/build-optimizer   0.901.0
@angular-devkit/build-webpack     0.901.0
@angular-devkit/core              9.1.0
@angular-devkit/schematics        9.1.0
@ngtools/webpack                  9.1.0
@schematics/angular               9.1.0
@schematics/update                0.901.0
rxjs                              6.5.4
typescript                        3.8.3
webpack                           4.42.0
@angular-builders                 9.0.0
@just-jeb
Copy link
Owner

Yep, version mismatch is the root cause. Trying to find the best solution for this, thank you for such a well documented issue.

@just-jeb
Copy link
Owner

Should be fixed in v9.1.0-beta.1. Please update me if helped.

@faizplus
Copy link

Thanks @just-jeb for this quick fix. It is working with v9.1.0-beta.1

@kamilchlebek
Copy link
Contributor Author

Thank you @just-jeb. It's good with v9.1.0-beta.1

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

Successfully merging a pull request may close this issue.

3 participants