【问题标题】:Cannot Create React App Using create-react-app无法使用 create-react-app 创建 React 应用程序
【发布时间】:2020-10-26 11:36:32
【问题描述】:

我正在尝试使用

创建一个反应应用程序
create-react-app

但它得到以下错误

Creating a new React app in /home/freduah/react-jumia-clone/react-jumia-clone.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! Unexpected end of JSON input while parsing near '...ct-assign":"^2.0.0","'
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/freduah/.npm/_logs/2020-10-26T11_32_34_616Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting react-jumia-clone/ from /home/freduah/react-jumia-clone
Done.

【问题讨论】:

    标签: javascript reactjs npm create-react-app


    【解决方案1】:

    您是否尝试过使用npm cache clean --force 清除缓存?

    【讨论】:

    • 我试过了,但现在我得到了下面的错误npm ERR! Unexpected end of JSON input while parsing near '...bdih\nC8acONhBiiT69vZ'
    【解决方案2】:

    检查你的 npm 和其他版本 或者,

    尝试在终端中删除缓存为:

    npm cache clean --force
    

    【讨论】:

    • 我试过了,但现在我得到了下面的错误npm ERR! Unexpected end of JSON input while parsing near '...bdih\nC8acONhBiiT69vZ'
    猜你喜欢
    • 2019-11-29
    • 1970-01-01
    • 2022-10-20
    • 1970-01-01
    • 2020-09-16
    • 1970-01-01
    • 2018-04-21
    • 2019-10-15
    相关资源
    最近更新 更多