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

Error: Big integer literals are not available in the configured target environment #66

Closed
fylzero opened this issue Jul 7, 2022 · 2 comments

Comments

@fylzero
Copy link

fylzero commented Jul 7, 2022

When compiling my front end application with Vite I'm running into the following error:

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")

    node_modules/v-money3/dist/v-money3.es.js:137:34:
      137 │     __publicField(this, "number", 0n);
          ╵                                   ~~

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")

    node_modules/v-money3/dist/v-money3.es.js:223:41:
      223 │       thatNum = thatNumber.getNumber() * 10n ** BigInt(diff);
          ╵                                          ~~~

✘ [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")

    node_modules/v-money3/dist/v-money3.es.js:225:35:
      225 │       thisNum = this.getNumber() * 10n ** BigInt(diff * -1);
          ╵                                    ~~~
@fylzero
Copy link
Author

fylzero commented Jul 7, 2022

Found a solution here: vitejs/vite#6985 (comment)

@fylzero fylzero closed this as completed Jul 7, 2022
@jonathanpmartins
Copy link
Owner

jonathanpmartins commented Jul 8, 2022

You don't need to use esnext, es2020 should be fine!

Can I use bigInt? https://caniuse.com/bigint

image

https://caniuse.com/?search=es2020

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

2 participants