以下の内容はhttps://takuya-1st.hatenablog.jp/entry/2018/11/09/013000より取得しました。


yarn install/npm i でnode-gypがエラーになったときの原因が調べたらpyenvだった

いつものように npm i 決めてたら

エラーになりました。

node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@11.0.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/takuya/.pyenv/shims/python2 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack pyenv: python2: command not found
gyp ERR! stack
gyp ERR! stack The `python2' command exists in these Python versions:
gyp ERR! stack   2.7.15

python2じゃないってエラーじゃん。

macOS の標準システムをターゲットに作られているのでpyenv が入っていたら消す。

対策

該当プロジェクトに入って

pyenv local  system

npm するまえに、pythonをシステム標準のものにする必要がある。怖い。

node-gyp がエラーになりだすと、gyp 関連で落ちてるのか、node のバージョンで落ちてるか、本当にわからない。

たいていは fsevent でエラーになるんだけど。npm マジ困る。




以上の内容はhttps://takuya-1st.hatenablog.jp/entry/2018/11/09/013000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14