0

I am trying to build my angular12 project on ubuntu. when I run ng build command I get an error An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'

Is it version issue? My node version is 14.15

I executed the command npm install --save-dev @angular-devkit/build-angular but still no luck. Can someone please help me to resolve this?

My package.json

"dependencies": {
"@angular/animations": "~12.2.0",
"@angular/common": "~12.2.0",
"@angular/compiler": "~12.2.0",
"@angular/core": "~12.2.0",
"@angular/forms": "~12.2.0",
"@angular/platform-browser": "~12.2.0",
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"@datorama/akita": "^6.2.3",
"@datorama/akita-ng-entity-service": "^6.1.2",
"@datorama/akita-ng-router-store": "^6.0.2",
"@mdi/font": "^5.9.55",
"@ng-bootstrap/ng-bootstrap": "^10.0.0",
"angular-oauth2-oidc": "^12.0.2",
"angular-oauth2-oidc-jwks": "^12.0.0",
"bn-ng-idle": "^1.0.1",
"bootstrap": "^4.5.3",
"chart.js": "^2.9.4",
"compass-mixins": "^0.12.10",
"core-js": "^3.16.4",
"font-awesome": "^4.7.0",
"jspdf": "^2.3.1",
"ng-bootstrap": "^1.6.3",
"ng-sidebar": "^9.4.2",
"ng2-charts": "^2.4.3",
"ngx-bootstrap": "^7.0.0",
"ngx-print": "^1.2.1",
"ngx-toastr": "^14.1.0",
"rxjs": "~6.6.0",
"sass": "^1.38.2",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^12.2.3",
"@angular/cli": "~12.2.0",
"@angular/compiler-cli": "~12.2.0",
"@angular/localize": "^12.2.0",
"@types/jasmine": "~3.8.0",
"@types/jspdf": "^2.0.0",
"@types/node": "^12.11.1",
"jasmine-core": "~3.8.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.3.5"
},

when i run ng version i can see this

enter image description here

RobC
  • 22,977
  • 20
  • 73
  • 80
yog
  • 199
  • 1
  • 2
  • 20
  • Does this answer your question? [Could not find module "@angular-devkit/build-angular"](https://stackoverflow.com/questions/50333003/could-not-find-module-angular-devkit-build-angular) – Yong Shun Aug 31 '21 at 09:14
  • No, I tried all those solutions, nothing helped – yog Aug 31 '21 at 13:22

0 Answers0