我想使用node命令提示符创建一个新的angular应用程序。但是在创建新的角度应用程序时,其抛出错误
internal / modules / cjs / loader.js:651
抛出错误;
错误:找不到模块'rxjs'
Node JS版本:v11.11.0-Angular-cli版本:6.7.0
D:\Angular Project>ng new testapp
internal/modules/cjs/loader.js:651
throw err;
^
Error: Cannot find module 'rxjs'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (C:\Users\krishna\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\experimental\jobs\create-job-handler.js:11:16)
at Module._compile (internal/modules/cjs/loader.js:799:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
答案 0 :(得分:-2)
安装节点10.15.3
的稳定版本。
运行package-lock.json
后删除node_modules
和文件夹npm install