I tried to update the angular CLI following this, but now I can't run my app. When I try to run the command ng serve
, it gives me this error:
Could not find the implementation for builder @angular-devkit/build-angular:dev-server Error: Could not find the implementation for builder @angular-devkit/build-angular:dev-server at WorkspaceNodeModulesArchitectHost.resolveBuilder (C:\Users\Lupus\Documents\full-stack-projects\financial-app-ui\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:49:19) at ServeCommand.initialize (C:\Users\Lupus\Documents\full-stack-projects\financial-app-ui\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:745:11) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
I have tried everything I could found.
npm install --save-dev @angular-devkit/build-angular
npm i --only=dev
:
npm install ng update npm update
node_modules
folder and the package-lock.json
file and ran the commands all again.Nothing worked. Running ng v
gives me this:
Angular CLI: 8.0.3 Node: 10.15.0 OS: win32 x64 Angular: 8.0.1 ... animations, cdk, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router Package Version ----------------------------------------------------------- @angular-devkit/architect 0.13.9 @angular-devkit/build-angular 0.13.9 @angular-devkit/build-optimizer 0.13.9 @angular-devkit/build-webpack 0.13.9 @angular-devkit/core 7.3.9 @angular-devkit/schematics 8.0.3 @angular/cli 8.0.3 @ngtools/webpack 7.3.9 @schematics/angular 8.0.3 @schematics/update 0.800.3 rxjs 6.5.2 typescript 3.4.5 webpack 4.29.0
And my package.json is like this:
{ "name": "financial-app-ui", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^8.0.1", "@angular/cdk": "^8.0.1", "@angular/common": "^8.0.1", "@angular/compiler": "^8.0.1", "@angular/core": "^8.0.1", "@angular/forms": "^8.0.1", "@angular/platform-browser": "^8.0.1", "@angular/platform-browser-dynamic": "^8.0.1", "@angular/router": "^8.0.1", "core-js": "^2.6.9", "font-awesome": "^4.7.0", "primeicons": "^1.0.0", "primeng": "^7.1.3", "rxjs": "~6.5.2", "tslib": "^1.10.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "^0.13.9", "@angular/cli": "^8.0.3", "@angular/compiler-cli": "^8.0.1", "@angular/language-service": "^8.0.1", "@types/jasmine": "~2.8.8", "@types/jasminewd2": "~2.0.3", "@types/node": "~8.9.4", "codelyzer": "~4.5.0", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "~4.0.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~2.0.1", "karma-jasmine": "~1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.4.0", "ts-node": "~7.0.0", "tslint": "~5.11.0", "typescript": "~3.4.5" } }
Does anyone have any other suggestion?
To solve the error "Could not find module '@angular-devkit/build-angular'", make sure to install the package by opening your terminal in your project's root directory and running the following command: npm i -D @angular-devkit/build-angular and restart your IDE and development server.
If you still have the problem, please run npm i @angular-devkit/schematics , and after the update project, you can remove @angular-devkit/schematics from your package. json file, and then again delete node_modules folder and package-lock. json file and run npm i .
This package contains Architect builders used to build and test Angular applications and libraries.
I got this working by reinstalling the build-angular package. Note the '--save-dev' flag on the install command:
npm uninstall @angular-devkit/build-angular npm install --save-dev @angular-devkit/build-angular
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With