Closed 24bitIO closed 4 years ago
Maybe this isn't the most correct fix, but I got around it by changing line 1 to:
const binding = require('node-gyp-build')('node_modules/cue-sdk')
This is more like an issue with pkg
: https://github.com/vercel/pkg#native-addons
Native addons (.node files) use is supported, but packaging .node files inside the executable is not resolved yet. You have to deploy native addons used by your project to the same directory as the executable.
Try to copy node_modules/cue-sdk/prebuilds
folder to the same folder as the executable.
In trying to package my node app as an executable using 'pkg' I receive this error when launching the .exe:
It's described well here: https://github.com/parcel-bundler/parcel/issues/5090
The problem arises in line 1 of index.js:
const binding = require('node-gyp-build')(__dirname)
To recreate: simply require the cue-sdk module, and run pkg.