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

Big integer literals are not available in the configured target environment #279

Open
alphonso06 opened this issue Feb 22, 2022 · 7 comments

Comments

@alphonso06
Copy link

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

@unolee
Copy link

unolee commented Mar 12, 2022

Same, it is maybe because not using rollup in svelte Kit

@adrian13val
Copy link

This issue has already been resolved in a svelte-kit repo

sveltejs/kit#859

@CoreyT355
Copy link

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.

@rockfruit
Copy link

rockfruit commented Jun 10, 2022

Would it be too rude to bump this?
#279

@idosius
Copy link

idosius commented Jul 5, 2022

@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

@chuongtang
Copy link

Adding this into my vite config helped solve the problem
optimizeDeps:{ esbuildOptions:{ target: 'es2020' }

@JeelRajodiya
Copy link

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)

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

8 participants