gpt4 book ai didi

node.js - NPM 无法在 Windows 10 上安装 node-sass

转载 作者:行者123 更新时间:2023-12-04 15:36:29 26 4
gpt4 key购买 nike

在 Windows 10 上安装 node-sass(所有版本 4.9.0、4.12.0、4.13.0 等)时遇到问题。

NPM 版本 - v6.4.1
Node 版本 - 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--unsafe-perm 等等,但都不起作用。

P.S 在我的旧电脑上运行完美。相同的 Node ,npm 版本。我还将所有 AppData/npm AppData/npm-cache 文件夹复制到新 PC - 但仍然无法正常工作。

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

最佳答案

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

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

关于node.js - NPM 无法在 Windows 10 上安装 node-sass,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59578847/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com