无法创建新的 angular 项目
Can't create a new angular project
尝试使用
创建一个新的 angular 项目
ng new Project
所有文件都已创建,只是节点模块文件夹未创建,并以此消息结尾
⠧ Installing packages...npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...1.0.30000656","del-cl'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shashank/.npm/_logs/2020-08-18T13_48_27_002Z-debug.log
✖ Package install failed, see above.
按照建议我试过了,
npm cache clean --force
和
npm install
问题依旧...
确保控制台以管理员权限打开
需要进一步的信息才能继续进行故障排除,但您可以尝试做的是:
- 在
../AppData/Roaming
中手动删除目录npm
和npm-cache
- 运行 在您的终端
npm cache clean --force
- 使用
npm install -g @angular/cli
安装您的软件包
尝试使用
创建一个新的 angular 项目ng new Project
所有文件都已创建,只是节点模块文件夹未创建,并以此消息结尾
⠧ Installing packages...npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...1.0.30000656","del-cl'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shashank/.npm/_logs/2020-08-18T13_48_27_002Z-debug.log
✖ Package install failed, see above.
按照建议我试过了,
npm cache clean --force
和
npm install
问题依旧...
确保控制台以管理员权限打开
需要进一步的信息才能继续进行故障排除,但您可以尝试做的是:
- 在
../AppData/Roaming
中手动删除目录 - 运行 在您的终端
npm cache clean --force
- 使用
npm install -g @angular/cli
安装您的软件包
npm
和npm-cache