angular-cli: Could not find the implementation for builder @angular-devkit/build-angular:browser
π Bug report
- [ ] new
- [ x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
I tried to build the project using ng build --prod I got this error.
π₯ Exception or Error
Could not find the implementation for builder @angular-devkit/build-angular:browser
Error: Could not find the implementation for builder @angular-devkit/build-angular:browser
at WorkspaceNodeModulesArchitectHost.resolveBuilder (/Volumes/Data/Angular/htdocs/thecampus-angular/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js:49:19)
at BuildCommand.initialize (/Volumes/Data/Angular/htdocs/thecampus-angular/node_modules/@angular/cli/models/architect-command.js:135:55)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
π Your Environment
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 8.0.0
@angular/cli 8.0.0
@angular/compiler-cli 8.0.0
@ngtools/webpack 6.0.8
@schematics/angular 8.0.0
@schematics/update 0.800.0
rxjs 5.5.12
typescript 2.5.3
webpack 4.8.3
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 34
What have worked for me was:
1.) Make sure your angular version starts with 7.2.15 (if not, you should install this version first) 2.) Be sure your Node version is 12.x.x 3.) Typescript version 3.4.5 3.) ng update @angular/cli @angular/core
(for @angular/cli, be sure to install it both local & global)
4.) npm uninstall @angular-devkit/build-angular 5.) npm install @angular-devkit/build-angular 6.) ng update --all 7.) If you have ViewChild on your application, be sure to edit them with: Source@ViewChild(<name>, {static: true}) <name>; // Adding static: true on the 2nd param
I got this error when I to upgrade from angular 7 to 8
npm uninstall @angular-devkit/build-angular npm install --save-dev @angular-devkit/build-angular
For my case, I found the reason from here https://github.com/meltedspark/angular-builders/blob/master/MIGRATION.MD
npm audit fix worked for me
Hi, @angular/cli version 8 will only work with Angular version 8.
Unfortunately Angular version 5 and CLI version 1, are not longer supported https://angular.io/guide/releases#support-policy-and-schedule
I suggest you update to version 8 by running the update command via
ng update @angular/cli @angular/core
, This is suggested because when running the update command several migrations will be executed to make your project compatible with the new version which otherwise youβd need to do manually.If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
I faced this issue after updating the typescript to latest version but it was resolved by ng update @angular/core in project
worked for me
One important thingβ¦be VERY CAREFUL with running the command of βng update --allβ At this point in time, it upgraded my karma/jasmine to an unstable version and caused me so much pain to figure out the root cause (tests would randomly fail).
step 6 fails with:
I did a lot of weird stuff to get it working:
Seems to work now. Compiles the bundles and starts de app.
This one worked for me! but something strange now in my package.json:
β@angular-devkit/build-angularβ: β^0.800.3β,
Is this normal?