error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
See original GitHub issueDescribe the bug
During build it throws with:
error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
To Reproduce
A new svelte@next init app and a minimal Getting started code from https://github.com/timostamm/protobuf-ts.
(I know, but I don’t have time right now for a new repo)
Expected behavior
I can build.
Can I change the target it detects? Can I remove that “es2019” for example?
Stacktraces
Stack trace
> Transform failed with 2 errors:
pages\players\index.svelte-e4c16403.js:4121:23: error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
pages\players\index.svelte-e4c16403.js:4160:23: error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
Error: Transform failed with 2 errors:
pages\players\index.svelte-e4c16403.js:4121:23: error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
pages\players\index.svelte-e4c16403.js:4160:23: error: Big integer literals are not available in the configured target environment ("chrome61", "edge18", "es2019", "firefox60", "safari11")
at failureErrorWithLog (C:\kit\node_modules\esbuild\lib\main.js:1224:15)
at C:\kit\node_modules\esbuild\lib\main.js:1072:33
at C:\kit\node_modules\esbuild\lib\main.js:568:9
at handleIncomingPacket (C:\kit\node_modules\esbuild\lib\main.js:657:9)
at Socket.readFromStdout (C:\kit\node_modules\esbuild\lib\main.js:535:7)
at Socket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at Socket.Readable.push (internal/streams/readable.js:223:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
Information about your SvelteKit Installation:
Diagnostics
System: OS: Windows 10 10.0.19042 Binaries: Node: 14.16.0 - C:\Program Files\nodejs\node.EXE npm: 7.8.0 - C:\Program Files\nodejs\npm.CMD npmPackages: @sveltejs/kit: 1.0.0-next.70 => 1.0.0-next.70 svelte: 3.37.0 => 3.37.0 vite: 2.1.5 => 2.1.5
- Your adapter: static
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
You can set
optimizeDeps.esbuildOptions.target: 'es2020'
andbuild.target: 'es2020'
in the vite config to fix the issue (i believe)Hello 👋. I’ve run into this issue and the recommended solution doesn’t appear to be an option.
When I add
to
kit
insvelte.conifg.js
and runnpm run build
(i.e.svelte-kit build
), I get the message:Reading around a bit in the Discord channel and in other issues, it sounds like SveleKit targets
es2019
withes2020
lib support. Is there a configuration that will allow for the use of Big integer literals?I am testing this with the template app recommended on the SvelteKit homepage with TypeScript enabled. I’ve set the
tsconfig.json
target toes2020
in case there was some interaction there that might be problematic.My use case would work fine with
adapter-static
if there is some way that the adapter might help here.Please let me know if I can fill in any additional details or if I should open a new issue on this. Thanks! 🙏