我正在尝试创建一个react
项目,但发现以下错误:
58 packages are looking for funding
run `npm fund` for details
found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
这是cmd:
D:\React_Redux_Course\React Projects>npx create-react-app my_app_test --use-npm
npx: installed 98 in 50.461s
Creating a new React app in D:\React_Redux_Course\React Projects\my_app_test.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
> core-js@2.6.11 postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js@3.6.5 postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure@3.6.5 postinstall D:\React_Redux_Course\React Projects\my_app_test\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
+ cra-template@1.0.3
+ react-scripts@3.4.1
+ react@16.13.1
+ react-dom@16.13.1
added 1624 packages from 750 contributors and audited 1628 packages in 1030.934s
58 packages are looking for funding
run `npm fund` for details
found 1 low severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
任何人都知道问题出在哪里,我该如何解决呢?
它冻结在这行上,直到我找到此消息
Terminate batch job (Y/N)?
我尝试了npm audit fix
并显示了以下结果:
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\DELL\AppData\Roaming\npm-cache\_logs\2020-06-16T20_54_24_759Z-debug.log
当我尝试第一时间运行此命令时,发现以下警告:
┌───────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\DELL\.config │
└───────────────────────────────────────────────────────────┘
我再次运行此命令,警告消失了