saleor-storefront without python2
jiapei100 opened this issue · comments
Pei JIA commented
What I'm trying to achieve
Make saleor-storefront run without python2, but python3 ONLY.
Steps to reproduce the problem
- Download and
npm i
.
What I expected to happen
The following ERR messages gone.
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path ....../saleor-storefront/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /opt/node-v16.15.0-linux-x64/bin/node ....../saleor-storefront/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli '/opt/node-v16.15.0-linux-x64/bin/node',
npm ERR! gyp verb cli '....../saleor-storefront/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.15.0 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/node-gyp/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at ....../saleor-storefront/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python /usr/bin/python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python -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: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:398:12)
npm ERR! gyp
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2022-06-05T11_21_20_684Z-debug-0.log
Screenshots
Refer to the above
System information
Operating system: Ubuntu 20.04
Browser: Chrome
Node: v16.15.0
Any suggestions?
Thank you ...
Pei JIA commented
Sorry... All my bad... Deprecated...