Wulf / nodehun

The Hunspell binding for NodeJS that exposes as much of Hunspell as possible and also adds new features. Hunspell is a first class spellcheck library used by Google, Apple, and Mozilla.
MIT License
286 stars 42 forks source link

[ERROR] TypeError: cannot use a string pattern on a bytes-like object #80

Closed loretoparisi closed 4 years ago

loretoparisi commented 4 years ago

I'm getting this error with latest nodehun nodehun@3.0.1

mbploreto:webservice loretoparisi$ node --version
v12.13.1
mbploreto:webservice loretoparisi$ npm --version
6.12.1
mbploreto:webservice loretoparisi$ node-gyp --version
v6.0.1
  CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
  LIBTOOL-STATIC Release/nothing.a
Traceback (most recent call last):
  File "./gyp-mac-tool", line 611, in <module>
    sys.exit(main(sys.argv[1:]))
  File "./gyp-mac-tool", line 30, in main
    exit_code = executor.Dispatch(args)
  File "./gyp-mac-tool", line 45, in Dispatch
    return getattr(self, method)(*args[1:])
  File "./gyp-mac-tool", line 248, in ExecFilterLibtool
    if not libtool_re.match(line) and not libtool_re5.match(line):
TypeError: cannot use a string pattern on a bytes-like object
make: *** [Release/nothing.a] 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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.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/loretoparisi/Documents/Projects/node_modules/nodehun
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN musixmatch-ai-console@6.2.6-20200511 No repository field.
npm WARN musixmatch-ai-console@6.2.6-20200511 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodehun@3.0.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the nodehun@3.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

I'm not sure if this issue is related to node-gyp version, because I'm using node v12 since a while and it worked ok.

loretoparisi commented 4 years ago

[UPDATE] Okay, according here, this issue seems to be related to macOS and using /usr/local/bin/python as Python 3.7.7, while node-gpy (still) only supports Python 2.7.

Closing, maybe this can help some one else btw.