smelte
smelte copied to clipboard
Big integer literals are not available in the configured target environment
Problem
- Installation/Config error
- Fails to compile
Expected Output
Compiles and allows access to Tailwind styles and Smelte components.
Actual Output
Pre-bundling dependencies:
svelte
svelte/store
svelte/animate
svelte/easing
svelte/internal
(...and 11 more)
(this will be run only when your dependencies or config have changed)
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:524:10:
524 │ base: 0n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:525:16:
525 │ components: 0n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:526:15:
526 │ utilities: 0n
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:548:10:
548 │ base: 1n << reservedBits << 0n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:548:32:
548 │ base: 1n << reservedBits << 0n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:549:16:
549 │ components: 1n << reservedBits << 1n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:549:38:
549 │ components: 1n << reservedBits << 1n,
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:550:15:
550 │ utilities: 1n << reservedBits << 2n
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:550:37:
550 │ utilities: 1n << reservedBits << 2n
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/util/bigSign.js:9:24:
9 │ return (bigIntValue > 0n) - (bigIntValue < 0n);
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/util/bigSign.js:9:45:
9 │ return (bigIntValue > 0n) - (bigIntValue < 0n);
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:552:18:
552 │ reservedBits += 3n;
╵ ~~
X [ERROR] Big integer literals are not available in the configured target environment ("chrome87", "edge88", "es2019", "firefox78", "safari13.1")
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/tailwindcss/lib/jit/lib/setupContextUtils.js:556:15:
556 │ let bits = 1n << BigInt(i + offset) << reservedBits;
Steps to reproduce
Follow these instructions.
Environment
Operating System: Microsoft Windows 11 Pro 10.0.22000 Node.js: v16.13.1 PNPM: 6.31.0 Svelte: 3.44.0 Svelte Kit: 1.0.0-next.281 Smelte: 1.1.8
Same, it is maybe because not using rollup in svelte Kit
This issue has already been resolved in a svelte-kit repo
https://github.com/sveltejs/kit/issues/859
I'm actually running a brand new fork of this repo, and the issue is still happening. Overriding the build target per the comments in that issue has not fixed the errors either here. I've even tried updating sveltekit to the latest next.315, no change.
It seems like multiple people are missing the fix here, so could someone please explain the solution in more detail.
Would it be too rude to bump this? https://github.com/matyunya/smelte/issues/279
@adrian13val Seems like configuring Vite's target build indeed solves the issue when building. However, it still reproduces when running the dev server, this configuration seems to have no effect there
Adding this into my vite config helped solve the problem
optimizeDeps:{ esbuildOptions:{ target: 'es2020' }
Adding this into my vite config helped solve the problem
optimizeDeps:{ esbuildOptions:{ target: 'es2020' }
adding it gives me this new error
Internal server error: Failed to resolve import "svelte-waypoint" from "node_modules\smelte\src\components\Image\Image.svelte". Does the file exist?
Plugin: vite:import-analysis
File: D:/languages/web/projects/svelte-todo-android/node_modules/smelte/src/components/Image/Image.svelte
29 | } from "svelte/internal";
30 |
31 | import Waypoint from "svelte-waypoint";
| ^
32 | import { fade } from "svelte/transition";
33 | const file = "D:/languages/web/projects/svelte-todo-android/node_modules/smelte/src/components/Image/Image.svelte";
at formatError (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35035:46)
at TransformContext.error (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35031:19)
at normalizeUrl (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:40181:33)
at async TransformContext.transform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:40315:47)
at async Object.transform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:35284:30)
at async loadAndTransform (file:///D:/languages/web/projects/svelte-todo-android/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:39812:29)