【问题标题】:npm install fails for ionic project离子项目的 npm install 失败
【发布时间】:2019-10-25 11:30:52
【问题描述】:

您好,当我尝试安装 ionic-angular 时遇到此错误

PS D:\ENDART\DART-MOBILE> npm install ionic-angular
npm ERR! Unexpected token } in JSON at position 423538 while parsing near '...gZvBqA=="
npm ERR!     }
npm ERR!   }
npm ERR! }
npm ERR! '

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\NIKITHRA\AppData\Roaming\npm-cache\_logs\2019-06-11T05_18_26_257Z-debug.log
PS D:\ENDART\DART-MOBILE>

我尝试了这个解决方案。但没有解决。 Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq'

PS D:\ENDART\DART-MOBILE> npm config set registry "https://registry.npmjs.com/"
PS D:\ENDART\DART-MOBILE> npm cache clear --force
npm WARN using --force I sure hope you know what you are doing.
PS D:\ENDART\DART-MOBILE> npm cache verify
Cache verified and compressed (~\AppData\Roaming\npm-cache\_cacache):
Content verified: 0 (0 bytes)
Index entries: 0
Finished in 0.036s

如何解决。

【问题讨论】:

    标签: ionic-framework npm angular7 npm-install


    【解决方案1】:

    如果您在您的环境中配置HTTP_PROXY

    http://username:password@proxy.server.com:port
    

    npm config rm proxy
    npm config rm https-proxy
    

    然后试试这个:

    rm -f package-lock.json 
    

    然后

    npm install
    

    【讨论】:

      猜你喜欢
      • 2021-05-08
      • 2016-01-22
      • 1970-01-01
      • 2023-01-23
      • 2019-02-23
      • 2017-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多