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)
答案 0 :(得分:0)
从错误消息中可以很明显地看出,@angular-devkit/build-angular
在已安装的node_modules中不可用。
只需运行:
npm install --save-dev @angular-devkit/build-angular
你应该很好。
答案 1 :(得分:0)
您可能正确执行了安装步骤,但未正确安装。
用ng update
检查是否有最新的棱角商品。
与npm outdated
一起检查,看是否有一些包裹让您烦恼。
如果您具有代理,并且不允许安装CLI的某些部分,请使用
将代理添加到节点npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
如果问题出在git上,请安装git。
如果问题出在依赖项上,请确保使用npm i @lacking-dependency
此外,请务必知道区别between --save-dev and --save