主题 : 请问一下前端npm install的时候最后报错是不是升级一下版本就可以了
级别: 贡士
UID: 130787
积分:407 加为好友
威望: 47 精华: 0
主题:60 回复:259
注册时间:2019-07-22
在线时长:0
1#   发表于:2023-02-08 15:45:20  IP:106.67.*.*
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (D:\workspaces\cms\jeecms_x1\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (D:\workspaces\cms\jeecms_x1\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at D:\workspaces\cms\jeecms_x1\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:192:21)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\workspaces\\cms\\jeecms_x1\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=
"
gyp ERR! cwd D:\workspaces\cms\jeecms_x1\node_modules\node-sass
gyp ERR! node -v v14.19.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN The package element-theme-chalk is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\webpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 postinstall 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\Administrator\AppData\Roaming\npm-cache\_logs\2023-02-08T07_41_54_455Z-debug.log
级别: 总版主
UID: 10736
积分:148381 加为好友
威望: 205 精华: 42
主题:287 回复:126139
注册时间:2010-09-08
在线时长:15.55
2#   发表于:2023-02-08 16:38:54  IP:115.239.*.*
node版本要是 12版本的,可以在把node_modules 删除在重试下
路漫漫其修远兮,吾将上下而求索!
级别: 贡士
UID: 130787
积分:407 加为好友
威望: 47 精华: 0
主题:60 回复:259
注册时间:2019-07-22
在线时长:0
3#   发表于:2023-02-08 16:41:28  IP:106.67.*.*
回复第2楼   我的是14.19.3
级别: 总版主
UID: 10736
积分:148381 加为好友
威望: 205 精华: 42
主题:287 回复:126139
注册时间:2010-09-08
在线时长:15.55
4#   发表于:2023-02-08 16:43:10  IP:115.239.*.*
得切换到12版本上,可以考虑弄个nvm 版本管理工具
路漫漫其修远兮,吾将上下而求索!
级别: 贡士
UID: 130787
积分:407 加为好友
威望: 47 精华: 0
主题:60 回复:259
注册时间:2019-07-22
在线时长:0
5#   发表于:2023-02-08 16:44:04  IP:106.67.*.*
回复第4楼  14.19.3版本现在用不了吗
级别: 总版主
UID: 10736
积分:148381 加为好友
威望: 205 精华: 42
主题:287 回复:126139
注册时间:2010-09-08
在线时长:15.55
6#   发表于:2023-02-08 16:48:37  IP:115.239.*.*
不确定,开始研发x1是采用的12版本
路漫漫其修远兮,吾将上下而求索!
1 共1页