簡體   English   中英

如何解決 npm 錯誤“npm ERR! errno 9009” at dev: `lite-server`

[英]how to solve npm error “npm ERR! errno 9009” at dev: `lite-server`

所以,我開始學習引導程序,為此我必須安裝和配置 node & npm 來運行 lite-server 我已經創建了我的 .json 文件並使用命令“npm install lite-server --save-”安裝了 lite 服務器dev”然后在將“dev”:“lite-server”添加到json文件的腳本並嘗試運行命令“npm run dev”之后出現此錯誤。

 $ npm run dev > bootstrapcourse@1.0.0 dev C:\\Users\\Shahir K\\Desktop\\bootstrapcourse > lite-server '"node"' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 9009 npm ERR! bootstrapcourse@1.0.0 dev: `lite-server` npm ERR! Exit status 9009 npm ERR! npm ERR! Failed at the bootstrapcourse@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\\Users\\Shahir K\\AppData\\Roaming\\npm-cache\\_logs\\2020-09-01T04_38_50_640Z-debug.log

任何人都可以解釋這個問題,我將在下面提供我的 json 文件和日志文件

 { "name": "bootstrapcourse", "version": "1.0.0", "description": "first bootstrap course work to create package.jason \\\\[\\\on file", "main": "index.html", "scripts": { "dev": "lite-server", "test": "echo \\"Error: no test specified\\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/shaheerk48/bootstrapworkrepo.git" }, "author": "shahir", "license": "ISC", "bugs": { "url": "https://github.com/shaheerk48/bootstrapworkrepo/issues" }, "homepage": "https://github.com/shaheerk48/bootstrapworkrepo#readme", "devDependencies": { "lite-server": "^2.5.4" } }

日志文件->

 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'D:\\\\NODE\\\\node.exe', 1 verbose cli 'D:\\\\NODE\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dev' 1 verbose cli ] 2 info using npm@6.14.6 3 info using node@v12.18.3 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle bootstrapcourse@1.0.0~predev: bootstrapcourse@1.0.0 6 info lifecycle bootstrapcourse@1.0.0~dev: bootstrapcourse@1.0.0 7 verbose lifecycle bootstrapcourse@1.0.0~dev: unsafe-perm in lifecycle true 8 verbose lifecycle bootstrapcourse@1.0.0~dev: PATH: D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;C:\\Users\\Shahir K\\Desktop\\bootstrapcourse\\node_modules\\.bin;C:\\Users\\Shahir K\\bin;D:\\Git\\mingw64\\bin;D:\\Git\\usr\\local\\bin;D:\\Git\\usr\\bin;D:\\Git\\usr\\bin;D:\\Git\\mingw64\\bin;D:\\Git\\usr\\bin;C:\\Users\\Shahir K\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\Java\\jdk-13.0.1\\bin;C:\\Program Files\\dotnet;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn;D:\\Git\\cmd;.;C:\\Program Files\\Java\\jdk-13.0.1\\bin";C:\\PHP7;D:\\NODE;D:\\NODE\\node_modules\\npm\\bin;C:\\Users\\Shahir K\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Shahir K\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\MinGW\\bin;C:\\Users\\Shahir K\\AppData\\Roaming\\npm;D:\\Git\\usr\\bin\\vendor_perl;D:\\Git\\usr\\bin\\core_perl 9 verbose lifecycle bootstrapcourse@1.0.0~dev: CWD: C:\\Users\\Shahir K\\Desktop\\bootstrapcourse 10 silly lifecycle bootstrapcourse@1.0.0~dev: Args: [ '/d /s /c', 'lite-server' ] 11 silly lifecycle bootstrapcourse@1.0.0~dev: Returned: code: 9009 signal: null 12 info lifecycle bootstrapcourse@1.0.0~dev: Failed to exec dev script 13 verbose stack Error: bootstrapcourse@1.0.0 dev: `lite-server` 13 verbose stack Exit status 9009 13 verbose stack at EventEmitter.<anonymous> (D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\lib\\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid bootstrapcourse@1.0.0 15 verbose cwd C:\\Users\\Shahir K\\Desktop\\bootstrapcourse 16 verbose Windows_NT 10.0.18363 17 verbose argv "D:\\\\NODE\\\\node.exe" "D:\\\\NODE\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js" "run" "dev" 18 verbose node v12.18.3 19 verbose npm v6.14.6 20 error code ELIFECYCLE 21 error errno 9009 22 error bootstrapcourse@1.0.0 dev: `lite-server` 22 error Exit status 9009 23 error Failed at the bootstrapcourse@1.0.0 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 9009, true ]

所以,我開始學習引導程序,為此我必須安裝和配置 node & npm 來運行 lite-server 我已經創建了我的 .json 文件並使用命令“npm install lite-server --save-”安裝了 lite 服務器dev”然后在將“dev”:“lite-server”添加到json文件的腳本並嘗試運行命令“npm run dev”之后出現此錯誤。

 $ npm run dev > bootstrapcourse@1.0.0 dev C:\\Users\\Shahir K\\Desktop\\bootstrapcourse > lite-server '"node"' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 9009 npm ERR! bootstrapcourse@1.0.0 dev: `lite-server` npm ERR! Exit status 9009 npm ERR! npm ERR! Failed at the bootstrapcourse@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\\Users\\Shahir K\\AppData\\Roaming\\npm-cache\\_logs\\2020-09-01T04_38_50_640Z-debug.log

任何人都可以解釋這個問題,我將在下面提供我的 json 文件和日志文件

 { "name": "bootstrapcourse", "version": "1.0.0", "description": "first bootstrap course work to create package.jason \\\\[\\\on file", "main": "index.html", "scripts": { "dev": "lite-server", "test": "echo \\"Error: no test specified\\" && exit 1" }, "repository": { "type": "git", "url": "git+https://github.com/shaheerk48/bootstrapworkrepo.git" }, "author": "shahir", "license": "ISC", "bugs": { "url": "https://github.com/shaheerk48/bootstrapworkrepo/issues" }, "homepage": "https://github.com/shaheerk48/bootstrapworkrepo#readme", "devDependencies": { "lite-server": "^2.5.4" } }

日志文件->

 0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'D:\\\\NODE\\\\node.exe', 1 verbose cli 'D:\\\\NODE\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dev' 1 verbose cli ] 2 info using npm@6.14.6 3 info using node@v12.18.3 4 verbose run-script [ 'predev', 'dev', 'postdev' ] 5 info lifecycle bootstrapcourse@1.0.0~predev: bootstrapcourse@1.0.0 6 info lifecycle bootstrapcourse@1.0.0~dev: bootstrapcourse@1.0.0 7 verbose lifecycle bootstrapcourse@1.0.0~dev: unsafe-perm in lifecycle true 8 verbose lifecycle bootstrapcourse@1.0.0~dev: PATH: D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;C:\\Users\\Shahir K\\Desktop\\bootstrapcourse\\node_modules\\.bin;C:\\Users\\Shahir K\\bin;D:\\Git\\mingw64\\bin;D:\\Git\\usr\\local\\bin;D:\\Git\\usr\\bin;D:\\Git\\usr\\bin;D:\\Git\\mingw64\\bin;D:\\Git\\usr\\bin;C:\\Users\\Shahir K\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\Java\\jdk-13.0.1\\bin;C:\\Program Files\\dotnet;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn;D:\\Git\\cmd;.;C:\\Program Files\\Java\\jdk-13.0.1\\bin";C:\\PHP7;D:\\NODE;D:\\NODE\\node_modules\\npm\\bin;C:\\Users\\Shahir K\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Shahir K\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\MinGW\\bin;C:\\Users\\Shahir K\\AppData\\Roaming\\npm;D:\\Git\\usr\\bin\\vendor_perl;D:\\Git\\usr\\bin\\core_perl 9 verbose lifecycle bootstrapcourse@1.0.0~dev: CWD: C:\\Users\\Shahir K\\Desktop\\bootstrapcourse 10 silly lifecycle bootstrapcourse@1.0.0~dev: Args: [ '/d /s /c', 'lite-server' ] 11 silly lifecycle bootstrapcourse@1.0.0~dev: Returned: code: 9009 signal: null 12 info lifecycle bootstrapcourse@1.0.0~dev: Failed to exec dev script 13 verbose stack Error: bootstrapcourse@1.0.0 dev: `lite-server` 13 verbose stack Exit status 9009 13 verbose stack at EventEmitter.<anonymous> (D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (D:\\NODE\\node_modules\\npm\\node_modules\\npm-lifecycle\\lib\\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid bootstrapcourse@1.0.0 15 verbose cwd C:\\Users\\Shahir K\\Desktop\\bootstrapcourse 16 verbose Windows_NT 10.0.18363 17 verbose argv "D:\\\\NODE\\\\node.exe" "D:\\\\NODE\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js" "run" "dev" 18 verbose node v12.18.3 19 verbose npm v6.14.6 20 error code ELIFECYCLE 21 error errno 9009 22 error bootstrapcourse@1.0.0 dev: `lite-server` 22 error Exit status 9009 23 error Failed at the bootstrapcourse@1.0.0 dev script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 9009, true ]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM