node.js アプリを (nodejitsu と heroku の両方で) デプロイしようとしたときに、libxmljs で同じエラーが発生しました。
> libxmljs@0.4.1 preinstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make node
make: scons: Command not found
make: *** [node] Error 127
npm http 200 https://registry.nodejitsu.com/css-stringify
npm http 200 https://registry.nodejitsu.com/css-parse
npm http 200 https://registry.nodejitsu.com/is-promise/-/is-promise-1.0.1.tgz
> libxmljs@0.4.1 preuninstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make clean
make: scons: Command not found
make: *** [clean] Error 127
npm http GET https://registry.nodejitsu.com/css-stringify/-/css-stringify-1.0.5.tgz
npm http GET https://registry.nodejitsu.com/css-parse/-/css-parse-1.0.4.tgz
npm WARN continuing anyway libxmljs@0.4.1 preuninstall: `make clean`
npm WARN continuing anyway Exit status 2
npm ERR! libxmljs@0.4.1 preinstall: `make node`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the libxmljs@0.4.1 preinstall script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make node
npm ERR! You can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
npm ERR! System SunOS 5.11
npm ERR! command "node" "/opt/local/bin/npm" "install" "--loglevel=http"
npm ERR! cwd /root/tmp/tmp-31613c7bs0y8/build/package
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
ご覧のとおり、コマンド 'scons' が見つからないため、libxmljs の 'make node' と 'make clean' 内で失敗しています。アプリの node_modules ディレクトリに libxmljs がインストールされており、「scons」は「/usr/local/bin/scons」にあります。
scons の場所が libxmljs の make 環境のパスにあることを確認する必要があると思いますが、その方法がわかりません。どんな助けでも大歓迎です!
更新: この質問 ( node.js アプリケーションを heroku にデプロイできない) のアドバイスに従って、libxmljs を package.json の依存関係に追加し、node_modules/ を .gitignore に追加しました。これにより、heroku は依存関係を確認してインストールできます。自体。しかし、まったく同じエラーが発生したため、問題の根本はローカル環境にあるのではなく、libxmljs に関するより大きな問題にあると思われますか?