-
Notifications
You must be signed in to change notification settings - Fork 1k
Weird, not working just out of the box in the simplest scenario (details inside) #705
Comments
Is anyone paying attention to this? This is a serious issue, it really undermines the reliability of the project 😬 |
Can you share the exact setup of your environment and the code (like a git repository) |
@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 |
Also, this issue seems to be linked to #758. If you look at the module there leveldown it seems to be using node-gyp-build the same way that the package sodium-native uses node-gyp-build. |
FWIW, I'm also having this problem with leveldown and libsodium. I'll share any info if I can fix it. 🤞 |
I'm not sure if this issue is still tracked by the creator but I have a question: Which NodeJS version are using? Because the CI of this module checks only up to v10. It could be a problem with a newer NodeJS version. |
Hey, I tested your problem with Travis CI and a Debian OS, this isn't an error by The developer of ASAP I will try to update Update: 30th Nov. 2019 ASAP I'll update this comment with new information. Update: 30th Nov. 2019 2pm
Link: https://github.com/zeit/pkg/#native-addons The second part of the quote is the key to this problem. I'll try to explain it with an example:
So, our application is looking for this module
Yeah and then it should work, btw I uploaded my build version for Windows 10 with NodeJS v10.15.3. >> I think this issue can be closed now! Attachments |
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label |
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit. |
I literally just did
npm install -g pkg
followed bypkg 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 mybuild/
directory.When I try to run
build/main-macos
it fails with the following message:Any idea on why this is happening?
Node version: v8.12.0
NPM version: 6.4.1
OS: MacOS 10.13.6
The text was updated successfully, but these errors were encountered: