mapbox / mapbox/node-pre-gyp

Unable to run binaries using node-pre-gyp

Open
#387 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

I used node-pre-gyp to deploy c++ node addon, when I'm installing the binaries I got a dlopen error :

$ node test.js
module.js:681
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: \\?\C:\Users\Lhousaine\Desktop\nodeAddons\test\node_modules\wakanda-stora
ge\bin\wakanda_storage.node nest pas une application Win32 valide.
\\?\C:\Users\Lhousaine\Desktop\nodeAddons\test\node_modules\wakanda-storage\bin\
wakanda_storage.node
    at Object.Module._extensions..node (module.js:681:18)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Lhousaine\Desktop\nodeAddons\test\node_modul
es\wakanda-storage\lib\index.js:4:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

any suggestion about the source of this problem
I can now figure out that npm install come with a linux version of the module then when passing --update-binary it find the correct one. but still don't understand why npm install cannot find windows and mac version by default

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the installation with npm install and --update-binary on the Windows setup described, then inspect the installed package's lib/index.js and the selected binary path. Done means npm install selects a valid Windows or macOS binary without --update-binary and node test.js loads it successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.