gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 22:04:55 24 4
gpt4 key购买 nike

我无法解决这个错误!!我快疯了:

这是错误:

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

这是建议:

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. 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

使用以下工具:

1. Mojave 10.14.5

2.XCODE 10.2.1

3.Python 2.7

最佳答案

问题似乎出在 Fiber@3.1.1 上, Node 版本 12 不支持它。

通过删除我最新的 Nodejs 12.3.1 并安装以前的稳定版本 11 来修复它。

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

关于node.js - npm安装错误,是node-gyp mojave问题吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56845089/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com