简体   繁体   English

npm 安装错误,是 node-gyp mojave 问题吗?

[英]npm install error, is node-gyp mojave problem?

I can't resolve this error !!我无法解决这个错误!! I'm getting crazy:我快疯了:

Here is the error:这是错误:

gyp ERR! stack Error: Can't find Python executable "/path/to/python27/python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:149:21)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.3.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/federicofrydman/Desktop/glamitGitHub/front-quiz/node_modules/fibers
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-gyp exited with code: 1

This was suggested:有人建议:

Please make sure you are using a supported platform and node version.请确保您使用的是受支持的平台和节点版本。 If you would like to compile fibers on this machine please make sure you have setup your build environment-- Windows + OS X instructions here: https://github.com/nodejs/node-gyp Ubuntu users please run: sudo apt-get install g++ build-essential RHEL users please run: yum install gcc-c++ and yum groupinstall 'Development Tools' Alpine users please run: sudo apk add python make g++ sh: nodejs: command not found npm WARN ts-pnp@1.1.2 requires a peer of typescript@* but none is installed.如果你想在这台机器上编译纤维,请确保你已经设置了你的构建环境——Windows + OS X 指令在这里: https : //github.com/nodejs/node-gyp Ubuntu 用户请运行: sudo apt-get install g++ build-essential RHEL 用户请运行: yum install gcc-c++yum groupinstall 'Development Tools' Alpine 用户请运行: sudo apk add python make g++ sh: nodejs: command not found npm WARN ts-pnp@1.1.2 requires typescript@* 的对等体,但没有安装。 You must install peer dependencies yourself.您必须自己安装对等依赖项。

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@3.1.1 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fibers@3.1.1 install 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!     /Users/federicofrydman/.npm/_logs/2019-07-02T03_47_12_405Z-debug.log

Using the following tools:使用以下工具:

1.MOJAVE 10.14.5 1.莫哈韦 10.14.5

2.XCODE 10.2.1 2.XCODE 10.2.1

3.PYTHON 2.7 3.Python 2.7

Issue seems to be with fibers@3.1.1 which is not supported in node version 12.问题似乎与节点版本 12 不支持的 Fiber@3.1.1 有关。

Fix it by removing my latest nodejs, 12.3.1, and installing the previous stable version of 11.通过删除我最新的 nodejs 12.3.1 并安装以前的稳定版本 11 来修复它。

https://nodejs.org/download/release/v11.15.0/ https://nodejs.org/download/release/v11.15.0/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM