[英]npm install error, is node-gyp mojave problem?
我無法解決這個錯誤!! 我快瘋了:
這是錯誤:
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
有人建議:
請確保您使用的是受支持的平台和節點版本。 如果你想在這台機器上編譯纖維,請確保你已經設置了你的構建環境——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@* 的對等體,但沒有安裝。 您必須自己安裝對等依賴項。
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.莫哈韋 10.14.5
2.XCODE 10.2.1
3.Python 2.7
問題似乎與節點版本 12 不支持的 Fiber@3.1.1 有關。
通過刪除我最新的 nodejs 12.3.1 並安裝以前的穩定版本 11 來修復它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.