gpt4 book ai didi

css - SASS 不工作,命令提示符在 gulp 服务期间抛出错误

转载 作者:行者123 更新时间:2023-11-28 06:10:34 25 4
gpt4 key购买 nike

我正在使用 angularjs 和 gulp 构建一个网络应用程序。每当我运行 gulp serve 时,网站都可以正常工作,但是 CSS 无法正常工作。我在命令提示符下收到以下错误。我试图重新安装 node_modules、node.js 和 gulp。但是,出现相同的错误。

npm WARN excluding symbolic link index.js -> lib/sass.js
npm WARN excluding symbolic link lib\index.js -> sass.js

bufferutil@1.2.1 install C:\Users\User\Desktop\grpkgb\project\node_modules\bufferutil
node-gyp rebuild


C:\Users\User\Desktop\grpkgb\project\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\User\Anaconda3\python.EXE" is v3.5.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:193:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:475:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\User\Desktop\grpkgb\project\node_modules\bufferutil
gyp ERR! node -v v5.7.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

utf-8-validate@1.2.1 install C:\Users\User\Desktop\grpkgb\project\node_modules\utf-8-validate
node-gyp rebuild


C:\Users\User\Desktop\grpkgb\project\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable "C:\Users\User\Anaconda3\python.EXE" is v3.5.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:193:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:475:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\User\Desktop\grpkgb\project\node_modules\utf-8-validate
gyp ERR! node -v v5.7.1
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1
projectFile@0.0.0 C:\Users\User\Desktop\grpkgb\project
+-- bootstrap-sass@3.3.6 extraneous
+-- gulp-sass@2.2.0 extraneous
`-- sass@0.5.0 extraneous

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.9
npm WARN projectFile@0.0.0 No repository field.
npm WARN projectFile@0.0.0 No license field.

最佳答案

错误说明了一切

gyp ERR! stack Error: Python executable "C:\Users\User\Anaconda3\python.EXE" is v3.5.1, which is not supported by gyp. gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.

您需要安装 Python this适用于 Node gyp 的版本。

您可以找到节点 gyp DOCs在这里了解更多详情

关于css - SASS 不工作,命令提示符在 gulp 服务期间抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36194291/

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