dotSlashLu / nodescws

scws(Simple Chinese Word Split) node.js binding - scws中文分词node.js模块
13 stars 5 forks source link

Install error on macOS #18

Closed agj closed 6 years ago

agj commented 6 years ago

Thank you for this package! Unfortunately, trying to install on macOS 10.13 and Node 9.5.0 I get this error:

> scws@0.5.0 install /Users/Ale/Desktop/hsk-vocab/node_modules/scws
> node-gyp rebuild

  CXX(target) Release/obj.target/scws/src/nodescws.o
../src/nodescws.cc:150:39: error: ordered comparison between pointer and zero
      ('char *' and 'int')
        else if (strstr(rule, ".ini") > 0) {
                 ~~~~~~~~~~~~~~~~~~~~ ^ ~
1 error generated.
make: *** [Release/obj.target/scws/src/nodescws.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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 17.4.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/Ale/Desktop/hsk-vocab/node_modules/scws
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scws@0.5.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scws@0.5.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
dotSlashLu commented 6 years ago

Hi agj, thanks for the report. I've published a new version v0.5.1 to address this problem, please give it a try. Please report back if the issue still persists, thanks.

agj commented 6 years ago

Yes, it's installing now. Thank you!