![](/img/trans.png)
[英]I've been trying to create a react app but I keep getting this error: "npm ERR! cb() never called!"
[英]npm error : cb() never called, what should I do?
大家好。
每次我尝试安装包时,我都会收到来自 npm 的错误。 我收到了这个错误:
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
我知道已经有一个关于我的问题的话题,但我真的尝试了我能找到的每一个解决方案,但没有一个有效。 我多次卸载并重新安装节点,清理了我的缓存,但我无能为力!
这是我的 package.json
{
"name": "XXXXXXXXXXX",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.21.0",
"discord.js": "^12.4.0",
"howlongtobeat": "^1.2.1",
"npm": "^6.14.8"
},
"devDependencies": {}
}
有人可以帮助我吗,我不知道该怎么办,我无法安装单个 package ...
谢谢 !
在花了几个小时研究了许多没有用的建议之后,我终于通过执行以下操作让 npx create-react-app 运行起来:
npm uninstall -g create-react-app
超时=60000;
首选离线=真;
你的 .npmrc 文件可以在 C:\\Program Files\\nodejs\\node_modules\\npm (windows) 中找到,然后重启你的电脑
npm 清理缓存 --force
npm install create-react-app
npx create-react-app my-app
其中 my-app 是您的项目名称 注意:我没有使用任何代理。
好的,我设法通过禁用防病毒软件来解决我的问题,我不知道为什么...
赶紧跑:
npm cache clean --force
npm cache verify
npm i -g npm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.