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.

Weird, not working just out of the box in the simplest scenario (details inside)

See original GitHub issue

I literally just did npm install -g pkg followed by pkg main.js --out-path build/

(main.js being, of course, the name of my node script)

After running this (with no errors) I get three files (main-linux, main-macos, main-win.exe) on my build/ directory.

When I try to run build/main-macos it fails with the following message:

pkg/prelude/bootstrap.js:1185
      throw error;
      ^

Error: No native build was found for platform=darwin arch=x64 runtime=node abi=57 uv=1 libc=glibc
...

Any idea on why this is happening?


Node version: v8.12.0 NPM version: 6.4.1 OS: MacOS 10.13.6

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:9

github_iconTop GitHub Comments

6reactions
christianbundycommented, Sep 18, 2019

FWIW, I’m also having this problem with leveldown and libsodium. I’ll share any info if I can fix it. 🤞

3reactions
johnsonjo4531commented, Sep 12, 2019

@lefuturiste @almosnow I was running into this issue too. I created a GitHub gist recreating the issue here (which has steps for reproduction and also shows the script runs normally without pkg): https://gist.github.com/johnsonjo4531/cbdace0097f9a658fd7c3ff439f5111e. My problem seems to be using the secure-password package. Here’s the rest of the stack trace which seems to indicate that node-gyp-build couldn’t find the build for sodium-native on the current platform:

> test@1.0.0 docker:run ~/Documents/code/docker/bins/test
> docker container run -t failed-pkg

pkg/prelude/bootstrap.js:1185
      throw error;
      ^

Error: No native build was found for platform=linux arch=x64 runtime=node abi=64 uv=1 libc=musl
    at Function.load.path (/snapshot/app/node_modules/node-gyp-build/index.js:56:9)
    at load (/snapshot/app/node_modules/node-gyp-build/index.js:20:30)
    at Object.<anonymous> (/snapshot/app/node_modules/sodium-native/index.js:1:101)
    at Module._compile (pkg/prelude/bootstrap.js:1261:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:710:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:635:17)
    at Module.require (pkg/prelude/bootstrap.js:1166:31)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@1.0.0 docker:run: `docker container run -t failed-pkg`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test@1.0.0 docker:run 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!    ~/.npm/_logs/2019-09-12T00_50_15_707Z-debug.log
Read more comments on GitHub >

github_iconTop Results From Across the Web

Weird, not working just out of the box in the simplest scenario ...
After running this (with no errors) I get three files ( main-linux , main-macos , main-win.exe ) on my build/ directory. When I...
Read more >
Why does some text display with square boxes in some apps ...
When running certain apps on Windows 10 desktop or Windows 10 Mobile, some characters display as a square or rectangular box, or as...
Read more >
12 Out-of-the-Box Interview Questions (With Sample Answers)
When preparing for a job interview, candidates review common questions they might receive about their background, strengths and goals.
Read more >
Puzzling Quantum Scenario Appears Not to Conserve Energy
By resolving a paradox about light in a box, researchers hope to clarify the concept of energy in quantum theory.
Read more >
Go-To Scripts for 16 Tricky Customer Service Scenarios
Use this guide to train new team members, engage in role-playing exercises, or just refine your own approach to customer service scenarios.
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