tiny-secp256k1
tiny-secp256k1 copied to clipboard
Nestjs ERROR Error: ENOENT: no such file or directory, open '/var/task/node_modules/tiny-secp256k1/lib/secp256k1.wasm'
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.
The problem solving by replacing this package: https://github.com/bitcoinerlab/secp256k1. I'm thinking the problem in paths, here was the same problem: https://github.com/microsoft/playwright/issues/5862
Related to: https://github.com/bitcoinjs/tiny-secp256k1/issues/116
I had the same issue when I deployed a Next.js application to Vercel.
Switching to the alternate library by bitcoinerlab worked awesome