paulmillr/noble-ed25519

Uncaught TypeError: can't convert BigInt to number

sunydev opened this issue · 4 comments

Hi I have this message when i run npm run build for a github page
i do not have this message when i run npm start

Thanks

Report this to your app bundler, this is not tech support forum

I also receive this error when running the command yarn build in a React app that is using the package noble-ed25519. I believe it is related to Babel.

error

For anyone else encountering this issue I was able to overcome it by installing the @babel/plugin-syntax-bigint package in my React app. So I ran yarn add @babel/plugin-syntax-bigint, then in my babel.config.json file I added it to the plugins array like so:

{
  "plugins": ["@babel/plugin-syntax-bigint"]
}

Also, wherever you are deploying it to don't forget to clear your cache/delete node_modules

https://babeljs.io/docs/en/babel-plugin-syntax-bigint

Hey folks, a quick heads up: bigint literals are no longer required as per 1.3.3, so shitty build tools could proceed with noble/ed25519 without hassle.