Node.js NPM可以';t在windows 10上安装节点sass

Node.js NPM可以';t在windows 10上安装节点sass,node.js,npm,Node.js,Npm,在windows 10上安装节点sass(所有版本4.9.0、4.12.0、4.13.0等)时出现问题 NPM版本-v6.4.1 节点版本-v10.15.3 问题: 3090 silly saveTree `-- node-sass@4.13.0 3091 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents): 3092 warn notsup SKIPPING OPTIONAL D

在windows 10上安装节点sass(所有版本4.9.0、4.12.0、4.13.0等)时出现问题

NPM版本-v6.4.1
节点版本-v10.15.3

问题:

3090 silly saveTree `-- node-sass@4.13.0
3091 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents):
3092 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
3093 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS:    darwin
3093 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch:  any
3093 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS:   win32
3093 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
3094 verbose stack Error: node-sass@4.13.0 install: `node scripts/install.js`
3094 verbose stack spawn bash ENOENT
3094 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
3094 verbose stack     at onErrorNT (internal/child_process.js:415:16)
3094 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
3095 verbose pkgid node-sass@4.13.0
3096 verbose cwd C:\xampp\htdocs\web\wp-content\themes\web
3097 verbose Windows_NT 10.0.18362
3098 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sass"
3099 verbose node v10.15.3
3100 verbose npm  v6.4.1
3101 error file bash
3102 error path bash
3103 error code ELIFECYCLE
3104 error errno ENOENT
3105 error syscall spawn bash
3106 error node-sass@4.13.0 install: `node scripts/install.js`
3106 error spawn bash ENOENT
3107 error Failed at the node-sass@4.13.0 install script.
3107 error This is probably not a problem with npm. There is likely additional logging output above.
3108 verbose exit [ 1, true ]
所有步骤均已完成: --force-g——不安全烫发等等,但都不起作用

在我的旧电脑上,它工作得很好。相同的节点,npm版本。我还将所有AppData/npm-AppData/npm-cache文件夹复制到新电脑上,但仍然无法工作


也许有人也面临同样的问题?可能缺少某些权限?

根据您需要安装的节点sass。

根据这些错误消息,您应该安装为系统提供bash shell(WSL、CygWin等)的软件


您是否从提升的PowerShell或CMD.exe(以管理员身份运行)运行了npm install--global--production windows build tools-tools@5.2.2安装后C:\Users\USER\.npm global\node\u modules\windows build tools>node./dist/index.js npm ERR!windows构建-tools@5.2.2postinstall:
node./dist/index.js
npm ERR!在windows生成时失败-tools@5.2.2安装后脚本。我使用--忽略脚本安装,它安装成功,但不起作用。在您的机器上安装wsl或任何为您提供bash shell(cygwin等)的软件@EmanuelIntilă谢谢,工作正常:)您为我节省了很多时间。您可以提交您的答案可能的副本:?
3101 error file bash
3102 error path bash
3103 error code ELIFECYCLE
3104 error errno ENOENT
3105 error syscall spawn bash
3106 error node-sass@4.13.0 install: `node scripts/install.js`
3106 error spawn bash ENOENT