我已经尝试了所有方法,并且永久性的npm错误使我无法进行npm安装,请问有人知道如何解决并摆脱这些错误,以便我可以进行正常的npm安装。
21 verbose stack Error: spawn git ENOENT 21 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) 21 verbose stack at onErrorNT (internal/child_process.js:456:16) 21 verbose stack at processTicksAndRejections (internal/process/task_queues.js:80:21) 22 verbose cwd /srv/daemon-data/c799c1b9-338f-41e8-bd64-35ce6d40e81a 23 verbose Linux 4.15.0-22-generic 24 verbose argv "/root/.nvm/versions/node/v12.14.0/bin/node" "/root/.nvm/versions/node/v12.14.0/bin/npm" "install" 25 verbose node v12.14.0 26 verbose npm v6.13.4 27 error code ENOENT 28 error syscall spawn git 29 error path git 30 error errno ENOENT 31 error enoent Error while executing: 31 error enoent undefined ls-remote -h -t ssh://git@github.com/mklabs/watchd.git 31 error enoent 31 error enoent 31 error enoent spawn git ENOENT 32 error enoent This is related to npm not being able to find a file. 33 verbose exit [ 1, true ]```
任何人都知道如何解决此问题,因为有人问我是否已将package.json用于以下npm安装,希望这有助于找到解决方案
"name": "udb",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"babel-cli": "^6.9.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-transform-regenerator": "^6.9.0",
"babel-preset-es2015": "^6.9.0",
"bake-cli": "^0.1.6",
"eslint": "^2.10.2",
"eslint-config-standard": "^5.3.1",
"eslint-plugin-promise": "^1.1.0",
"eslint-plugin-standard": "^1.3.2",
"mocha": "^2.5.2",
"standard-version": "^2.2.1",
"watchd": "github:mklabs/watchd"
},
"bake": {
"description": "Scaffold a basic ES6 setup",
"scripts": {
"start": "echo Starting generation of default template",
"prestart": "echo prestart",
"poststart": "echo poststart",
"install": "npm install --loglevel warn --cache-min Infinity",
"preinstall": "echo Installing dependencies ...",
"postinstall": "npm ls --depth 0"
}
},
"dependencies": {
"better-sqlite3": "^5.4.3",
"config-yml": "^0.10.3",
"console-stamp": "^0.2.9",
"discord.js": "^11.5.1",
"enmap": "^5.2.2",
"ffmpeg": "^0.0.4",
"google": "^2.1.0",
"got": "^9.6.0",
"lodash.sortby": "^4.7.0",
"moment": "^2.24.0",
"moment-duration-format": "^2.3.2",
"mongoose": "^5.7.5",
"ms": "^2.1.2",
"nodemon": "^2.0.2",
"opusscript": "^0.0.7",
"quick.db": "^7.0.0-b22",
"randomstring": "^1.1.5",
"strict-uri-encode": "^2.0.0",
"weather-js": "^2.0.0",
"ytdl-core": "^1.0.0"
},
"author": "",
"license": "ISC"
}
希望有人知道修复程序,并且可以帮助我解决这个问题。
答案 0 :(得分:0)
git
不在您的路径
您的文件日志状态:
28 error syscall spawn git
29 error path git