1、错误情况
gyp verb `which` succeeded python C:\Users\Software\Python\Python310\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\Software\Python\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (node:child_process:399:12)
gyp ERR! stack at ChildProcess.emit (node:events:526:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\18084\\Desktop\\phase-3\\fresh-market-master\\fresh-market-master\\生鲜超市\\online-store\\node_modules\\_node-gyp@3.8.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\18084\Desktop\phase-3\fresh-market-master\fresh-market-master\生鲜超市\online-store\node_modules\_node-sass@4.14.1@node-sass
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
[npminstall:runscript:error] node-sass@^4.5.2 scripts.postinstall run "node scripts/build.js" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
at ChildProcess.<anonymous> (C:\Users\18084\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (node:events:526:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
stdio: [Object],
exitcode: 1
}
× Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
at ChildProcess.<anonymous> (C:\Users\18084\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (node:events:526:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npminstall version: 5.8.0
npminstall args: C:\Program Files\nodejs\node.exe C:\Users\18084\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\18084\.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com