ekmartin / slack-irc

Connects Slack and IRC channels by sending messages back and forth.
MIT License
587 stars 155 forks source link

Fails npm install on OS X El Cap and Heroku due to node-icu-charset-detector #91

Closed buley closed 8 years ago

buley commented 8 years ago

Thank you for this nifty little bridge. I'm planning to use it to try to wire up Slack with Twitch.

A dependency seems to be throwing fatal errors. A similar error was reported in a similar project but there the dependency is optional.

The developer of this package does not seem to test on OS X or Linux.

[copilot] npm install

> node-icu-charset-detector@0.1.4 install /Users/buley/Code/twitchpilot/node_modules/node-icu-charset-detector
> node-gyp rebuild

  CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o
../node-icu-charset-detector.cpp:7:10: fatal error: 'unicode/ucsdet.h' file not found
#include <unicode/ucsdet.h>
         ^
1 error generated.
make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/Cellar/node/5.3.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/buley/Code/twitchpilot/node_modules/node-icu-charset-detector
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN install:node-icu-charset-detector@0.1.4 node-icu-charset-detector@0.1.4 install: `node-gyp rebuild`
npm WARN install:node-icu-charset-detector@0.1.4 Exit status 1
npm WARN EPACKAGEJSON twitchpilot@1.0.0 No description
npm WARN EPACKAGEJSON twitchpilot@1.0.0 No repository field.

[copilot] git push heroku master                                                                      master 
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Using set buildpack heroku/nodejs
remote: -----> Node.js app detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=true
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version (latest stable) via semver.io...
remote:        Downloading and installing node 5.9.1...
remote:        Using default npm version: 3.7.3
remote: 
remote: -----> Restoring cache
remote:        Loading 2 from cacheDirectories (default):
remote:        - node_modules
remote:        - bower_components (not cached - skipping)
remote: 
remote: -----> Building dependencies
remote:        Pruning any extraneous modules
remote:        Installing node modules (package.json)
remote:        
remote:        > node-icu-charset-detector@0.1.4 install /tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector
remote:        > node-gyp rebuild
remote:        
remote:        make: Entering directory `/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector/build'
remote:        CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o
remote:        ../node-icu-charset-detector.cpp:7:28: fatal error: unicode/ucsdet.h: No such file or director
remote:        #include <unicode/ucsdet.h>
remote:        ^
remote:        compilation terminated.
remote:        make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1
remote:        make: Leaving directory `/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detector/build'
remote:        gyp ERR! build error
remote:        gyp ERR! stack Error: `make` failed with exit code: 2
remote:        gyp ERR! stack     at ChildProcess.onExit (/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
remote:        gyp ERR! stack     at emitTwo (events.js:100:13)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
remote:        gyp ERR! System Linux 3.13.0-79-generic
remote:        gyp ERR! command "/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/bin/node" "/tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote:        gyp ERR! cwd /tmp/build_ab95e8c0f865492a7ca7a9c3b1a75523/node_modules/node-icu-charset-detecto
remote:        gyp ERR! node -v v5.9.1
remote:        gyp ERR! node-gyp -v v3.2.1
remote:        gyp ERR! not ok
remote: 
ekmartin commented 8 years ago

This shouldn't cause the install to fail, as node-icu-charset-detector is an optional dependency of node-irc. I get the same error output locally on OS X, however the install completes successfully afterwards nonetheless, with a warning that the optional dependency failed to build. Are you sure this isn't what happens for you too?

Someguy123 commented 8 years ago

@ekmartin You should write that in the README. At first I thought the bot was just going to not run at all.

ekmartin commented 8 years ago

Added a note about it now @Someguy123, thank you for the feedback.

https://github.com/ekmartin/slack-irc/blob/master/README.md#installation-and-usage