在安装Firebase Cloud Functions的软件包时,出现错误:404 Not Found -页面没有找到
当检查上述URL时,我确实看到:{“错误”:“未找到”}
我使用的是NodeJS版本14.20.1,npm版本9.1.3和firebase工具版本11.16.1。
下面是我的package.json文件:
{
"name": "functions",
"type": "module",
"scripts": {
"build": "tsc",
"emulators:start": "firebase emulators:start",
"emulators:stop": "lsof -t -i:5000 -i:5001 -i:4030 -i:9099 -i:9001 -i:9199 -i:8091 -i:9090 | xargs kill -9",
"serve": "npm run build && firebase emulators:start --only functions",
"shell": "npm run build && firebase functions:shell",
"start": "npm run shell",
"test": "mocha --reporter spec --timeout 10000",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "14"
},
"main": "lib/index.js",
"dependencies": {
"@babel/core": "^7.20.5",
"@babel/preset-env": "^7.20.2",
"@babel/runtime": "^7.20.6",
"@firebase/app-compat": "^0.1.28",
"@google-cloud/tasks": "^3.0.5",
"@types/rimraf": "^3.0.2",
"acorn": "^8.8.1",
"axios": "^0.27.2",
"chai": "^4.3.4",
"csv-parse": "^5.2.1",
"firebase-admin": "^11.3.0",
"firebase-functions": "^4.1.0",
"fs": "0.0.1-security",
"mocha": "^9.1.3",
"puppeteer": "^10.4.0",
"rimraf": "^3.0.2",
"typescript": "4.3.5",
"typesense": "^1.3.0"
},
"devDependencies": {
"firebase-functions-test": "^0.3.3"
},
"private": true
}
日志的结尾写道:
2781 verbose stack HttpErrorGeneral: 404 Not Found - GET https://registry.npmjs.org/database-debug.log - Not found
2781 verbose stack at /home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js:95:15
2781 verbose stack at processTicksAndRejections (internal/process/task_queues.js:95:5)
2781 verbose stack at async RegistryFetcher.packument (/home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:85:19)
2781 verbose stack at async RegistryFetcher.manifest (/home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/pacote/lib/registry.js:116:23)
2781 verbose stack at async Arborist.[nodeFromEdge] (/home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1056:19)
2781 verbose stack at async Arborist.[buildDepStep] (/home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:926:11)
2781 verbose stack at async Arborist.buildIdealTree (/home/wpghijsen/.nvm/versions/node/v14.20.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:206:7)
我按照npm ERR! 404 Not Found - GET https://registry.npmjs.org/error-ex检查了https://status.npmjs.org,但它没有显示任何事件。我突然想到,也许我需要一个不同的节点版本,但任何其他建议都会很有帮助。
1条答案
按热度按时间igetnqfo1#
作为社区wiki回答。
这在github thread中提到过。这是lib/outdated.js中的一个bug-它不应该把npm-debug.log当作一个要更新的包。如果你从node_modules中手动删除npm-debug.log,这个错误就会消失