我在 Windows 10 中從 git-bash-cli 運行“npm install node-sass”,得到一個“'node'不被識別為內(nèi)部或外部命令、可運行的程序或批處理文件?!?錯誤。我多年來一直使用這個設置,當我將節(jié)點升級到 10.16.0 時問題就開始了為防止不必要的回復:我看到的所有問題都只是說添加路徑變量。我已將 Node 添加到 PATH 變量并嘗試了多種不同的編寫方式。我最終重新安裝了 Node.js 并且它會自動完成,所以我就這樣保留了它。node 從命令行運行,而不是從腳本運行,例如 package.json 文件中的腳本。我嘗試重新安裝節(jié)點 8.11.3,這是我在問題開始之前使用的版本,但我遇到了同樣的錯誤。我又回到了 v 10.16.0。錯誤代碼如下:> node-sass@4.12.0 install C:\projects\true\true\website\truevue\node_modules\node-sass> node scripts/install.js'node' is not recognized as an internal or external command,operable program or batch file.npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\@nuxt\builder\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! node-sass@4.12.0 install: `node scripts/install.js`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the node-sass@4.12.0 install 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\Peter\AppData\Roaming\npm-cache\_logs\2019-07-24T23_41_06_896Z-debug.log
'node' 不是內(nèi)部或外部命令,也不是可運行的程序或批處理文件
守著星空守著你
2021-08-20 18:56:31