Skip to content

Error: Could not locate the bindings file #29

@wdgrantham

Description

@wdgrantham

I tried to install and use node-postal today and continue to get an error. I'm using MacOS Version 11.2.3 (Big Sur), node v12.16.2. I can run libpostal cli via terminal just fine, so I'm pretty sure I did the installation of libpostal correctly. Any suggestions?

/Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/bindings/bindings.js:135
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/build/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/build/Debug/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/build/Release/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/out/Debug/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/Debug/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/out/Release/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/Release/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/build/default/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/compiled/12.16.2/darwin/x64/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/addon-build/release/install-root/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/addon-build/debug/install-root/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/addon-build/default/install-root/expand.node
 → /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/lib/binding/node-v72-darwin-x64/expand.node
    at bindings (/Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/node_modules/node-postal/index.js:3:32)

Here's the output of node-gyp rebuild as requested in the read me:

 % node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@8.0.0
gyp info using node@12.16.2 | darwin | x64
gyp info find Python using Python version 3.7.3 found at "/usr/local/bin/python3"
gyp info spawn /usr/local/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/wyattgrantham/Documents/GitHub/lsp/api-lsp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/wyattgrantham/Library/Caches/node-gyp/12.16.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/wyattgrantham/Library/Caches/node-gyp/12.16.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/wyattgrantham/Library/Caches/node-gyp/12.16.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/wyattgrantham/Documents/GitHub/lsp/api-lsp',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: binding.gyp not found (cwd: /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/wyattgrantham/Documents/GitHub/lsp/api-lsp
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v8.0.0
gyp ERR! not ok 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions