Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Pkg error #1812

Closed
thegears opened this issue Nov 20, 2022 · 3 comments
Closed

Pkg error #1812

thegears opened this issue Nov 20, 2022 · 3 comments
Labels

Comments

@thegears
Copy link

thegears commented Nov 20, 2022

What version of pkg are you using?

5.8.0

What version of Node.js are you using?

19.1.0

What operating system are you using?

Arch Linux

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

node16-linux-x64 & windows

Describe the Bug


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

Error: File '/**/chat-aktar/node_modules/vm2/lib/setup-sandbox.js' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:657:19)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:1049:29)
    at Object.readFileSync (pkg/prelude/bootstrap.js:1097:18)
    at Object.<anonymous> (/snapshot/chat-aktar/node_modules/vm2/lib/vm.js:145:57)
    at Module._compile (pkg/prelude/bootstrap.js:1930:22)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    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) {
  errno: -2,
  code: 'ENOENT',
  path: '/snapshot/chat-aktar/node_modules/vm2/lib/setup-sandbox.js',
  pkg: true
}

Expected Behavior

Waiting for working exe and linux file.

To Reproduce

https://github.com/vercel/pkg

@Tom-Bury
Copy link

Can you try adding the package to your assets in the pkg config in your package.json? That seemed to do the trick on my end for the same error. Not sure why though.

"assets": [
   ...,
   "node_modules/vm2/**/*"
],

@github-actions
Copy link

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

@github-actions github-actions bot added the Stale label Mar 23, 2023
@github-actions
Copy link

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants