Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install 构建失败 #140

Open
zgjsxx opened this issue Jun 16, 2022 · 4 comments
Open

npm install 构建失败 #140

zgjsxx opened this issue Jun 16, 2022 · 4 comments

Comments

@zgjsxx
Copy link

zgjsxx commented Jun 16, 2022

node version : v16.15.0
git clone 项目, 执行npm install,报如下错误:

npm ERR! gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                                ^
npm ERR! gyp ERR! stack SyntaxError: invalid syntax
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:398:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! gyp ERR! System Linux 3.10.0-1160.el7.x86_64

升级node-sass 到6.0 版本后,成功构建
"node-sass": "^6.0",

@HackyleShawe
Copy link

请问下你的Node版本是多少啊?“sass-loader”的版本不需要改动吗?

1 similar comment
@HackyleShawe
Copy link

请问下你的Node版本是多少啊?“sass-loader”的版本不需要改动吗?

@shikongwuwei
Copy link

误导人了,报错提示是python3解释不了python2的代码。

@ttddss
Copy link

ttddss commented Jul 14, 2023

前端部署的说明:https://www.macrozheng.com/mall/deploy/mall_deploy_web.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants