Vinxi server build fails: Big integer literals not available in target environment ("es2019")
I am getting an error when building locally as well as when Netlify tries to build:
.../.vinxi/build/ssr/index.js:1:40327: ERROR: Big integer literals are not available in the configured target environment ("es2019")I have looked through the Solid Start, Vinxi and Nitro docs to try to figure out where I can configure this to use a more modern target environment. My
app.config.ts
currently looks like this:
And tsconfig.json
:
Nothing in either config file seems to have any impact on this "configured target environment" so any help on how I can reconfigure this would be much appreciated!2 Replies
Looks like it belongs to the "server" configuration option, here's a minimal setup to make BigInt work:
I agree that app configuration is difficult and not very thoroughly documented. This required lots of digging into vinxi and nitropack internals, searching for "es2019" inside node_modules/nitropack finally found it.
Hey! I never saw this until now! Should'a tagged me!
Thank you SO much for this! It immediately solved my problem. I had the config elsewhere instead of under
server:
, and so it was not having any effect on the server build 🤦♂️.
I was pulling my hair out trying to troubleshoot this... 😅
Where does this need to be documented? In the Vinxi config docs?/