Closed L8ter closed 3 years ago
bippity BOP bump?
I have same issue with leveldown resolution.
This is still an issue. It would be great if the workflow for using native modules was better or at least better documented.
Did you add:
"assets": [ "node_modules/leveldown/*/" ]
in package.json?
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 just want to mention that this is still a problem. Even with "assets": [ "node_modules/leveldown/**/*" ]
, pkg still can't bundle the native dependencies. It displays:
> pkg@5.8.0
> Warning Cannot include directory %1 into executable.
The directory must be distributed with executable as %2.
%1: node_modules/leveldown/prebuilds
%2: path-to-executable/prebuilds
> Warning Cannot include directory %1 into executable.
The directory must be distributed with executable as %2.
%1: node_modules/leveldown/prebuilds
%2: path-to-executable/prebuilds
Back in 2017 you added support for it somewhere along the lines it got messed up. Error:
(node:26872) UnhandledPromiseRejectionWarning: Error: No native build was found for platform=win32 arch=x64 runtime=node abi=64 uv=1 libc=glibc at Function.load.path (C:\snapshot\lockedware\node_modules\node-gyp-build\index.js:56:9) at load (C:\snapshot\lockedware\node_modules\node-gyp-build\index.js:20:30) at Object.<anonymous> (C:\snapshot\lockedware\node_modules\leveldown\binding.js:1:105) at Module._compile (pkg/prelude/bootstrap.js:1252:22) at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10) at Module.load (internal/modules/cjs/loader.js:610:32) at tryModuleLoad (internal/modules/cjs/loader.js:549:12) at Function.Module._load (internal/modules/cjs/loader.js:541:3) at Module.require (internal/modules/cjs/loader.js:648:17) at Module.require (pkg/prelude/bootstrap.js:1157:31)
You can re-create this by simply trying to get a id from level down will work in testing but not in compiled @zeit-test "support you added": https://github.com/zeit/pkg/blob/master/test/test-79-npm/leveldown/leveldown.js