我正在尝试创建一个反应应用
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.
答案 0 :(得分:0)
您是否尝试过使用npm cache clean --force
清除缓存?
答案 1 :(得分:0)
检查您的npm和其他版本 或者,
尝试以以下方式删除终端中的缓存:
npm cache clean --force