Skip to content

ERR_DLOPEN_FAILED error using pkg on windows (to create tauri sidecar) #213

Description

@robert-king

pkg (vercel) works on mac, but we get an error on windows when we add node-lmdb:

pkg-package.json

{
"name": "thred",
"version": "0.0.0",
"license": "MIT",
"private": true,
"pkg": {
"assets": [
"node_modules/.prisma-product/client/.node",
"node_modules/node-lmdb/prebuilds/darwin-arm64/
.node",
"node_modules/node-lmdb/prebuilds/win32-x64/*.node"
]
},
"dependencies": {
"node-lmdb": "^0.9.7"
}
}

tried running this command to package a binary:

pkg dist/apps/product-nest/main.js --targets=node16-win-x64 --output=src-tauri/binaries/nest-binary-x86_64-pc-windows-msvc.exe --config=./src-tauri/pkg-package.json --no-bytecode --public-packages "*" --public

Error: The specified procedure could not be found. C:\Users\me\AppData\Local\Temp\pkg\f314382814a582d08ca20f16316acc5eb5416dd93e488277bf9756db8a545fc8\node-lmdb\prebuilds\win32-x64\node.abi93.node at process.dlopen (pkg/prelude/bootstrap.js:2255:28) at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at Module.require (pkg/prelude/bootstrap.js:1855:31) at require (node:internal/modules/cjs/helpers:102:18) at load (C:\snapshot\thred-cloud\node_modules\node-gyp-build\node-gyp-build.js:22:10) at Object. (C:\snapshot\thred-cloud\node_modules\node-lmdb\index.js:3:43) at Module._compile (pkg/prelude/bootstrap.js:1930:22) { code: 'ERR_DLOPEN_FAILED' }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions