0

I tried to build an Angular application on my machine by installing node modules and I get the error as attached

This application totally works fine when installed on another machine. So its not a problem with the code. But please let me know how I can solve this I just tried did npm install npm install -g @angular/cli ng build where at the last build thing, I get this error Let me know how to solve itenter image description here

Package.json file

 "devDependencies": {
    "@angular-devkit/build-angular": "^0.900.6",
    "@angular-devkit/schematics": "^0.7.5",
    "@angular/cli": "^7.2.3",
    "@angular/compiler-cli": "^7.2.7",
    "@angular/language-service": "^7.2.2",
    "@angularclass/hmr": "^2.1.3",
    "@types/datatables.net": "^1.10.14",
    "@types/jasmine": "^2.8.16",
    "@types/jasminewd2": "^2.0.6",
    "@types/jquery": "^3.3.29",
    "@types/node": "^8.10.39",
    "@types/ramda": "^0.26.9",
    "codelyzer": "^4.5.0",
    "husky": "^1.3.1",
    "jasmine-core": "^3.3.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^4.0.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "^1.0.1",
    "karma-coverage-istanbul-reporter": "^2.0.4",
    "karma-jasmine": "^1.1.2",
    "karma-jasmine-html-reporter": "^1.4.0",
    "prettier": "^1.16.4",
    "pretty-quick": "^1.10.0",
    "protractor": "^5.4.2",
    "rxjs-tslint": "^0.1.6",
    "ts-node": "^7.0.1",
    "tslint": "^5.12.1",
    "typescript": "3.1.6"
  }

And the errors are as such

 Data path ".builders['app-shell']" should have required property 'class'.
    at MergeMapSubscriber.project (C:\Project\UI\node_modules\@angular-devkit\core\src\workspace\workspace.js:215:42)    
    at MergeMapSubscriber._tryNext (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
    at MergeMapSubscriber._next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MapSubscriber._next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\map.js:55:26)
    at MapSubscriber.Subscriber.next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at SwitchMapSubscriber.notifyNext (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:86:26)
    at InnerSubscriber._next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeTo.js:17:28
    at Object.subscribeToResult (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at SwitchMapSubscriber._innerSub (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:65:54)
    at SwitchMapSubscriber._next (C:\Project\UI\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\switchMap.js:55:14)
2
  • Please include error text as text, not as a picture of text. Commented Mar 16, 2020 at 17:00
  • I did add the errors as text Commented Mar 16, 2020 at 17:55

2 Answers 2

0

run command rm -rf node_modules/

clean catch by giving command npm clean cache -f

Please perform the following steps and let me know if its working.

npm uninstall @angular-devkit/build-angular
npm install @angular-devkit/[email protected]
Sign up to request clarification or add additional context in comments.

1 Comment

Hi Rahul,I tried deleting the nodemodules and installing it again,But still the issue is the same.Attached the image to the actual post in the starting
0

In your package.json change the devkit builder.

"@angular-devkit/build-angular": "^0.900.6",

to

"@angular-devkit/build-angular": "^0.10.0",

Clear node modules before install again.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.