【问题标题】:I am using react and unable to install firebase我正在使用 react 并且无法安装 firebase
【发布时间】:2020-12-01 05:10:07
【问题描述】:
$ npm i firebase
npm ERR! Unexpected end of JSON input while parsing near '...0","karma-coverage-is'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ayush\AppData\Roaming\npm-cache\_logs\2020-12-01T04_59_26_404Z-debug.log

如果您知道解决方案,请帮助我

【问题讨论】:

    标签: javascript reactjs firebase npm


    【解决方案1】:

    请清理缓存并重试

    npm cache clean --force
    npm install --save firebase
    

    【讨论】:

    • npm ERR! Unexpected end of JSON input while parsing near '...\npBDRqjg8oL9IdnKZpE7' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Username\AppData\Roaming\npm-cache\_logs\2020-12-02T05_00_16_378Z-debug.log
    • 请以管理员身份打开 Windows Powershell 并再次尝试上述两个命令。
    • npm install --save firebase npm ERR! code EINTEGRITY npm ERR! sha512-w1plr2jYvzBkx/rHE6A0EJf9318ufA5omShLuGocPlQtrvphel+KJcd+R02outE5E2lSDhyM0l3EoiA0YCD4hA== integrity checksum failed when using sha512: wanted sha512-w1plr2jYvzBkx/rHE6A0EJf9318ufA5omShLuGocPlQtrvphel+KJcd+R02outE5E2lSDhyM0l3EoiA0YCD4hA== but got sha512-1znI2ZWBGAdXSYNAacUVZ18ahPNIUSEq8HnALlybmDM7zq48gOTP0Nz7bNj68UARsUei9LMgK8p1v0sGzS3IYQ==. (1477065 bytes) npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Ayush\AppData\Roaming\npm-cache\_logs\2020-12-02T11_24_41_696Z-debug.log
    • 请尝试以下2个命令:。 . $ rm -rf package-lock.json node_modules $ npm install 先尝试修复完整性错误
    猜你喜欢
    • 1970-01-01
    • 2020-12-13
    • 1970-01-01
    • 2021-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-29
    • 2022-09-25
    相关资源
    最近更新 更多