Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

SvelteKit: Identifier 'global' has already been declared #29

Closed
doceazedo opened this issue May 24, 2021 · 3 comments · Fixed by #30
Closed

SvelteKit: Identifier 'global' has already been declared #29

doceazedo opened this issue May 24, 2021 · 3 comments · Fixed by #30

Comments

@doceazedo
Copy link
Contributor

This error is thrown when using Svelte Kit:

21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9)
Identifier 'global' has already been declared
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x2)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x3)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x4)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x5)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x6)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x7)
21:24:03 [vite] Error when evaluating SSR module /node_modules/svelte-simple-datatables/src/stores/filters.js:
SyntaxError: Identifier 'global' has already been declared
    at new Function (<anonymous>)
    at instantiateModule (F:\Projetos HDD\desafio-desenvolvedor-frontend\node_modules\vite\dist\node\chunks\dep-e9a16784.js:68197:9) (x8)

Apparently Svelte Kit already uses the constant "global", but svelte-simple-datatables is trying to define it again in the last line of the file "node_modules/svelte-simple-datatables/src/stores/filters.js".

@subvind
Copy link

subvind commented May 25, 2021

i upgraded to svelte kit the other day and ran into this issue today.

@doceazedo doceazedo changed the title Svelte Kit: Identifier 'global' has already been declared SvelteKit: Identifier 'global' has already been declared May 26, 2021
@rodabt
Copy link

rodabt commented Jul 5, 2021

I had the issue today. Applied @PxLucasF fix and it seems everything is working fine.

@nooreldeensalah
Copy link

Is this fixed?

I tried using the library with sveltekit and I got the same error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants