运行该项目时,我已从angular.io教程下载了一个角度项目 它显示错误
无法从“ C:\ Users \ asus \ angulario”中找到模块“ @ angular-devkit / build-angular”。 错误:无法从“ C:\ Users \ asus \ angulario”中找到模块“ @ angular-devkit / build-angular”
Could not find module "@angular-devkit/build-angular" from "C:\\Users\\asus\\angulario".
Error: Could not find module "@angular-devkit/build-angular" from "C:\\Users\\asus\\angulario".
at Object.resolve (C:\Users\asus\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\asus\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\src\architect.js:132:40)
at Observable._trySubscribe (C:\Users\asus\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:44:25)
at Observable.subscribe (C:\Users\asus\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:30:22)
at C:\Users\asus\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:99:19
at new Promise (<anonymous>)
at Observable.toPromise (C:\Users\asus\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:97:16)
at ServeCommand.initialize (C:\Users\asus\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:88:94)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
答案 0 :(得分:1)
您需要先安装节点模块。
为此,您需要在下载的应用程序的根文件夹中运行npm i
(并且您还需要安装npm)
答案 1 :(得分:1)
您尚未安装节点模块。
请运行以下命令npm install
并运行应用程序。
答案 2 :(得分:0)
首先将NodeJS安装到您的计算机上,然后使用全局密钥安装npm软件包管理器,
npm i npm -g
然后您可以根据package.json文件安装npm软件包,作为先前的答复。
npm i