question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

I’m getting this error with latest nodehun nodehun@3.0.1 while building on macOS 10.14.5 (Darwin 18.6.0)

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:

It seems to me that this is related to node-gyp rather than this module itself.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
Wulfcommented, Aug 1, 2020

hey @loretoparisi 😃

I ran into this issue myself – turns out I just needed to updated NPM itself (which has node-gyp as a dependency)

npm i -g npm
1reaction
loretoparisicommented, Sep 5, 2020

@Wulf great, thank you! in fact it worked with node v12.16.1, npm v6.13.4, node-gyp v6.0.1. Closing then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: can't use a string pattern on a bytes-like object in re ...
This solved the error TypeError: cannot use a string pattern on a bytes-like object but then I got errors like UnicodeDecodeError: 'utf-8' codec ......
Read more >
Cannot use a string pattern on a bytes-like object in Python
The Python "TypeError: cannot use a string pattern on a bytes-like object" occurs when we try to use a string pattern to match...
Read more >
TypeError: cannot use a string pattern on a bytes-like
Bytes objects contain a sequence of single bytes. They are immutable, like strings, which means they cannot be changed. A bytes object is ......
Read more >
TypeError: can't use a string pattern on a bytes-like object in re ...
PYTHON : TypeError : can't use a string pattern on a bytes - like object in re.findall() [ Gift : Animated Search Engine ......
Read more >
cannot use a string pattern on a bytes-like object, please debug
The error likely is saying you can't use search on a byte. You can also use search on strings. 1 solution.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found