npm install ffi failing
See original GitHub issue
I ran npm install ffi
and the build failed on my macbook.
Setup: MBP w/ MacOS 10.13.4 Hardware: 11,1
Log:
> ffi@2.2.0 install /Users/Maciej/projects/tester/node_modules/ffi
> node-gyp rebuild
CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin64.o
LIBTOOL-STATIC Release/libffi.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 28, in main
exit_code = executor.Dispatch(args)
File "./gyp-mac-tool", line 43, in Dispatch
return getattr(self, method)(*args[1:])
File "./gyp-mac-tool", line 246, 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/libffi.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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/Cellar/node/10.5.0_1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Maciej/projects/tester/node_modules/ffi
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN tester No description
npm WARN tester No repository field.
npm WARN tester No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ffi@2.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ffi@2.2.0 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:
npm ERR! /Users/Maciej/.npm/_logs/2018-07-04T21_04_08_132Z-debug.log
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8
Top Results From Across the Web
Why does npm install ffi return error. Using node version 12
I am trying to call c++ API in a dll from node-js. So far I found that ffi can be used to do...
Read more >npm install ffi failing on Windows · Issue #280 - GitHub
I'm getting a same problem. Node-gyp installs just fine but ffi does not want to get installed: In administrative command prompt: C:\WINDOWS\ ...
Read more >node-ffi-napi - npm
A foreign function interface (FFI) for Node.js, N-API style. Latest version: 4.0.3, last published: 2 years ago. Start using ffi-napi in ...
Read more >ffi-napi-issue-nodejs-v14 - Joel Purra
Using Node.js v14.9.0 · Requiring ffi-napi in one package, then in another package crashes node with a core dump. The crash seems to...
Read more >Problem using FFI - MSDN - Microsoft
I have installed ffi in a nodejs function, however I am getting the following error, could you please point me to what is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Running
pyenv local system
once in the build directory worked for me.npm install git://github.com/node-ffi/node-ffi.git
seems fine.