[英]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.