【问题标题】:How do I get rid of this angular error message我如何摆脱这个角度错误消息
【发布时间】:2020-08-04 08:53:00
【问题描述】:

在尝试使用 Angular 创建新项目时,我在命令提示符中使用了命令 ng new my-dream-app,并收到以下错误消息:

 Installing packages...npm WARN deprecated tslint@6.1.1: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@1.2.12: fsevents 1 will break on node v14+. Upgrade to fsevents 2 with massive improvements.
npm ERR! Unexpected end of JSON input while parsing near '...t-config-prettier":"^'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Izormen Onotieose\AppData\Roaming\npm-cache\_logs\2020-04-21T14_21_50_827Z-debug.log
× Package install failed, see above.

请问我该怎么做?

【问题讨论】:

  • 你能告诉我们你的日志文件C:\Users\Izormen Onotieose\AppData\Roaming\npm-cache\_logs\2020-04-21T14_21_50_827Z-debug.log 吗?

标签: node.js json angular npm cmd


【解决方案1】:

尝试清理缓存并重新安装全局 Angular CLI。

以管理员身份打开CMD并运行

npm cache clean --force
npm install -g @angular/cli

【讨论】:

    【解决方案2】:

    看起来是缓存错误。试试这个:

    npm cache clean --force
    npm install -g @angular/cli
    

    干杯!

    【讨论】:

      猜你喜欢
      • 2013-07-19
      • 1970-01-01
      • 1970-01-01
      • 2015-04-29
      • 1970-01-01
      • 2019-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多