无法使用“npx创建react应用程序注册\ U react”创建react应用程序

svujldwt  于 2021-09-23  发布在  Java
关注(0)|答案(2)|浏览(340)

不幸的是,我未能使用创建react应用程序项目

npx create-react-app signup_react

但是我用这个命令做了很多项目。我需要帮助解决此问题,错误如下所示,

Creating a new React app in /media/imdadul/PERSONAL/Professional Works/React_Projects/signup_react.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/cli/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/imdadul/.npm/_logs/2021-07-09T16_19_45_838Z-debug.log

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

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting signup_react/ from /media/imdadul/PERSONAL/Professional Works/React_Projects
Done.

n、 b:请关注以上错误并帮助我了解这一点,谢谢。
npm版本:7.9.0
节点版本:v15.14.0
下面是这个问题的截图,

k7fdbhmy

k7fdbhmy1#

@alex,请关注这里,更新后的版本发生了变化 npm_version: 7.19.1 我已经照你说的做了,但我能跑 npm cache clean 运行此命令,它会显示下面给出的另一个错误,

npm ERR! As of npm@5, the npm cache self-heals from corruption issues
npm ERR! by treating integrity mismatches as cache misses.  As a result,
npm ERR! data extracted from the cache is guaranteed to be valid.  If you
npm ERR! want to make sure everything is consistent, use `npm cache verify`
npm ERR! instead.  Deleting the cache can only make npm go slower, and is
npm ERR! not likely to correct any problems you may be encountering!
npm ERR! 
npm ERR! On the other hand, if you're debugging an issue with the installer,
npm ERR! or race conditions that depend on the timing of writing to an empty
npm ERR! cache, you can use `npm install --cache /tmp/empty-cache` to use a
npm ERR! temporary cache instead of nuking the actual one.
npm ERR! 
npm ERR! If you're sure you want to delete the entire cache, rerun this command
npm ERR! with --force.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-07-09T17_26_16_921Z-debug.log

现在它显示了另一个错误,使用 npx create-react-app signup_react 命令,如下所示,

Missing dependencies in package.json

请关注以上错误解释

piah890a

piah890a2#

更新至最新版本 Node.js ,然后再试一次 npm install -g npm & npm cache clean 更多信息:从未调用过npm err cb()

相关问题