Could not find module "@angular-devkit/build-angular" from "C:\\College-Portal-master".
Error: Could not find module "@angular-devkit/build-angular" from "C:\\College-Portal-master".
at Object.resolve (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\node\resolve.js:141:11)
at Observable.rxjs_1.Observable [as _subscribe] (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\src\architect.js:132:40)
at Observable._trySubscribe (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:44:25)
at Observable.subscribe (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:30:22)
at C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:99:19
at new Promise (<anonymous>)
at Observable.toPromise (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:97:16)
at ServeCommand.initialize (C:\Users\Admin\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:130:86)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
-
how about give some information?Talg123– Talg1232019-01-11 19:24:24 +00:00Commented Jan 11, 2019 at 19:24
-
Welcome to Stack Overflow! You're not giving us enough informations to answer your question. Please read the guide on asking a good question and edit your question accordingly.Nino Filiu– Nino Filiu2019-01-11 19:28:02 +00:00Commented Jan 11, 2019 at 19:28
2 Answers
You probably did the installation steps correctly, but didn't install properly.
Check with ng update if you have the latest angular goods.
Check with npm outdated to see if some package is being annoying to you.
In the case you have a proxy, and it is not allowing the installation of some parts of the CLI, add the proxy to node with
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
In the case the problem was with git, install git.
In the case the problem is with dependencies, be sure to update them with npm i @lacking-dependency
Also, be sure to know the difference between --save-dev and --save
Comments
As it's quite clear from the error message, @angular-devkit/build-angular is not available in the installed node_modules.
Just run this:
npm install --save-dev @angular-devkit/build-angular
And you should be good.
2 Comments
@angular-devkit/build-angular to build the app before it could be served. It's not something that you generally add to the imports array of an NgModule.