Mac M1上的YARN安装正在为Python提供“ Python2”在没有发现错误的路径中
时,我会遇到以下错误
- 我试图通过纱线运行一个前端项目,当我进行纱线安装节点版本14.19.3
- YARN 1.22.18
- “ node-sass”:“^4.14.1” ,,,,
yarn add v1.22.18
[1/5]
Im Trying to run a frontend project through yarn and i'm getting the following error when i do yarn install
- node version 14.19.3
- yarn 1.22.18
- "node-sass": "^4.14.1",
yarn add v1.22.18
[1/5] ???? Resolving packages...
warning [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
[2/5] ???? Fetching packages...
[3/5] ???? Linking dependencies...
warning "react-apollo > @apollo/[email protected]" has unmet peer dependency "apollo-cache@^1.3.2".
warning " > [email protected]" has incorrect peer dependency "formik@^1.5.7".
warning "react-formik-ui > react-phonenr-input > [email protected]" has unmet peer dependency "prop-types@^15.5.4".
warning " > [email protected]" has unmet peer dependency "webpack@>=2".
warning " > [email protected]" has incorrect peer dependency "styled-components@^4.1.1".
warning "redoc > swagger2openapi > [email protected]" has unmet peer dependency "[email protected] - 6".
warning " > [email protected]" has unmet peer dependency "react-is@>= 16.8.0".
warning " > [email protected]" has incorrect peer dependency "eslint@^4.19.1 || ^5.3.0".
warning "eslint-config-airbnb > [email protected]" has incorrect peer dependency "eslint@^4.19.1 || ^5.3.0".
warning " > [email protected]" has unmet peer dependency "[email protected]".
warning " > [email protected]" has unmet peer dependency "[email protected]".
warning " > [email protected]" has unmet peer dependency "[email protected]".
[4/5] ???? Building fresh packages...
[-/13] ⠐ waiting...
[7/13] ⠐ node-sass
[-/13] ⠐ waiting...
[-/13] ⠐ waiting...
error /Users/suhasr/someproject/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/suhasr/someproject/node_modules/node-sass
Output:
Building: /opt/homebrew/Cellar/node@14/14.19.3/bin/node /Users/suhasr/someproject/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/opt/homebrew/Cellar/node@14/14.19.3/bin/node',
gyp verb cli '/Users/suhasr/someproject/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/suhasr/someproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/suhasr/someproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/suhasr/someproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (/Users/suhasr/someproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/suhasr/someproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/suhasr/someproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed at getNotFoundError (/Users/suhasr/someproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/suhasr/someproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/suhasr/someproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed python Error: not found: python
gyp verb `which` failed at getNotFoundError (/Users/suhasr/someproject/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/Users/suhasr/someproject/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/Users/suhasr/someproject/node_modules/which/which.js:80:29)
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/which/which.js:89:16
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /Users/suhasr/someproject/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
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 (/Usersnode_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/Users/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/Users/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/Users/node_modules/which/which.js:80:29)
gyp ERR! stack at /Users/node_modules/which/which.js:89:16
gyp ERR! stack at /Users/node_modules/isexe/index.js:42:5
gyp ERR! stack at /Usersnode_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:192:21)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/opt/homebrew/Cellar/node@14/14.19.3/bin/node" "/Usersnode_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/node_modules/node-sass
gyp ERR! node -v v14.19.3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论