質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Q&A

0回答

287閲覧

npmのモジュールのインストールで ’node-gyp rebuild`のエラーになる。

toshi_7710

総合スコア23

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

0グッド

1クリップ

投稿2017/08/25 09:28

画像加工のcamanJSのnpmモジュールをインストールすると、
’node-gyp rebuild`のエラーにインストールに失敗します。
node-gypのリビルトが必要ということなので、リビルドを行うと、そこでもエラーになり、困っています。

カレントディレクトリは、/Users/xxx/work/xxx/test_monacaapp/testReact
OS:MacOs Sierra Ver.10.12.5
↓画像加工のcamanJSのnpmモジュールのインストール失敗時のメッセージ

npm install caman > canvas@1.6.6 install /Users/xxx/work/xxx/test_monacaapp/testReact/node_modules/canvas > node-gyp rebuild gyp ERR! UNCAUGHT EXCEPTION gyp ERR! stack Error: spawn EACCES gyp ERR! stack at exports._errnoException (util.js:1018:11) gyp ERR! stack at ChildProcess.spawn (internal/child_process.js:319:11) gyp ERR! stack at exports.spawn (child_process.js:378:9) gyp ERR! stack at exports.execFile (child_process.js:143:15) gyp ERR! stack at checkPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:419:5) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:361:9 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:88:20 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15) gyp ERR! System Darwin 16.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/xxx/work/xxx/test_monacaapp/testReact/node_modules/canvas gyp ERR! node -v v6.11.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! This is a bug in `node-gyp`. gyp ERR! Try to update node-gyp and file an Issue if it does not help: gyp ERR! <https://github.com/nodejs/node-gyp/issues> npm ERR! Darwin 16.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "caman" npm ERR! node v6.11.0 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! canvas@1.6.6 install: `node-gyp rebuild` npm ERR! Exit status 7 npm ERR! npm ERR! Failed at the canvas@1.6.6 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the canvas package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs canvas npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls canvas npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/xxx/work/xxx/test_monacaapp/testReact/npm-debug.log

↓node-gypのリビルト失敗時のメッセージ

node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@6.11.0 | darwin | x64 gyp info spawn /usr/bin/python gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/Users/xxx/work/xxx/test_monacaapp/testReact/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/xxx/.node-gyp/6.11.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/xxx/.node-gyp/6.11.0', gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/xxx/.node-gyp/6.11.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/xxx/work/xxx/test_monacaapp/testReact', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp: binding.gyp not found (cwd: /Users/xxx/work/xxx/test_monacaapp/testReact) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:336:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Darwin 16.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild" gyp ERR! cwd /Users/xxx/work/xxx/test_monacaapp/testReact gyp ERR! node -v v6.11.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問