我在 Windows 10 中从 git-bash-cli 运行“npm install node-sass”,得到一个“'node'不被识别为内部或外部命令、可运行的程序或批处理文件。” 错误。我多年来一直使用这个设置,当我将节点升级到 10.16.0 时问题就开始了为防止不必要的回复:我看到的所有问题都只是说添加路径变量。我已将 Node 添加到 PATH 变量并尝试了多种不同的编写方式。我最终重新安装了 Node.js 并且它会自动完成,所以我就这样保留了它。node 从命令行运行,而不是从脚本运行,例如 package.json 文件中的脚本。我尝试重新安装节点 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
添加回答
举报
0/150
提交
取消