Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nestjs ERROR Error: ENOENT: no such file or directory, open '/var/task/node_modules/tiny-secp256k1/lib/secp256k1.wasm' #122

Open
Demiduska opened this issue Jul 17, 2023 · 3 comments

Comments

@Demiduska
Copy link

It's working locally, but when I try to deploy at Vercel and go to the homepage of the app I get a 500 error and this text in the the logs:

2023-07-17T08:26:03.211Z undefined ERROR Error: ENOENT: no such file or directory, open '/var/task/node_modules/tiny-secp256k1/lib/secp256k1.wasm'
at Object.openSync (node:fs:601:3)
at readFileSync (node:fs:469:35)
at Object. (/var/task/node_modules/tiny-secp256k1/lib/cjs/wasm_loader.cjs:7:38)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at Module.Hook._require.Module.require (/var/task/___vc/chunk-5HYM2HUI.js:2143:44)
at require (node:internal/modules/cjs/helpers:110:18) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/var/task/node_modules/tiny-secp256k1/lib/secp256k1.wasm'
}
RequestId: c970c88a-815a-4299-96ba-86b2b3cc3a69 Error: Runtime exited with error: exit status 1
Runtime.ExitError

@Demiduska
Copy link
Author

Demiduska commented Jul 17, 2023

The problem solving by replacing this package: https://github.com/bitcoinerlab/secp256k1.
I'm thinking the problem in paths, here was the same problem: microsoft/playwright#5862

@AryanJ-NYC
Copy link

Related to: #116

@IroncladDev
Copy link

I had the same issue when I deployed a Next.js application to Vercel.

Switching to the alternate library by bitcoinerlab worked awesome

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

No branches or pull requests

3 participants