我正在尝试将我的应用推送到Heroku,但我一直收到此错误,看起来像 node-gyp 的问题,但不知道如何修复它。
2854 verbose rebuildBundles fsevents@0.2.0
2855 verbose rebuildBundles [ 'nan' ]
2856 info install fsevents@0.2.0
2857 verbose unsafe-perm in lifecycle true
2858 info fsevents@0.2.0 Failed to exec install script
2859 error fsevents@0.2.0 install: `node-gyp rebuild`
2859 error Exit status 1
2860 error Failed at the fsevents@0.2.0 install script.
2860 error This is most likely a problem with the fsevents package,
2860 error not with npm itself.
2860 error Tell the author that this fails on your system:
2860 error node-gyp rebuild
2860 error You can get their info via:
2860 error npm owner ls fsevents
2860 error There is likely additional logging output above.
2861 error System Linux 3.8.11-ec2
2862 error command "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/node" "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/npm" "rebuild"
2863 error cwd /tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18
2864 error node -v v0.10.28
2865 error npm -v 1.4.9
2866 error code ELIFECYCLE
2867 verbose exit [ 1, true ]
! Push rejected, failed to compile Node.js app
答案 0 :(得分:0)
fsevents
is a Mac OS X only extension并且无法在Heroku(Linux)上安装。尝试使用package.json
中的optionalDependencies
使可选项成为可选项。