ClaudiaGiv

ClaudiaGiv

Using GoTrue library in Sveltekit gives this error at build time: GoTrue is not a constructor

I have a sveltekit project that is using GoTrue library for authentication. In development mode (npm run dev) everything works but when I build for production (npm run build) it gives this error:

GoTrue is not a constructor

TypeError: GoTrue is not a constructor

Reproduction
GitHub repo: GitHub - ClaudiaGiv/sveltekit-tailwindcss-board

I also tested if the problem is with vite by creating a svelte project with vite and adding the GoTrue library and it works also on development mode and also the build for production. So considering this, it seems that the problem is strictly with sveltekit, not with vite but I don’t understand exactly why or how to fix it.

GitHub repo: GitHub - ClaudiaGiv/vite-svelte-project

Does anyone know or have any idea what could be the problem and how can it be fixed?

Thank you!

Popular Frontend topics Top

PragmaticBookshelf
It’s hard to have a Rails application without integrating some client-side logic. But client-side coding tools, and the Rails tools for i...
New
PragmaticBookshelf
WebAssembly fulfills the long-awaited promise of web technologies: fast code, type-safe at compile time, execution in the browser, on emb...
New
PragmaticBookshelf
Upgrade your skill set, succeed at work, and avoid the many headaches that come with modern front-end development. Simplify your codebase...
New
First poster: bot
Microsoft’s Introduction to JavaScript video series will equip users with the basic skills to start building apps with the popular progra...
New
First poster: bot
SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. ...
New
First poster: bot
A new Dart blog post/announcement has been posted! Get the full details here: https://groups.google.com/a/dartlang.org/d/msg/announce/S...
New
magarrent
Welcome to @actionforms_io :rocket: No code - No backend Form sender for developers Send your without a backend Join now: https://www...
New
First poster: bot
Tailwind v3.0.12 has been released. Link: Release v3.0.12 · tailwindlabs/tailwindcss · GitHub
New
New
Fl4m3Ph03n1x
Background I have a button that may be disabled or not, depending on a set of conditions. I want to disable/enable the button without hav...
New

Other popular topics Top

Rainer
My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl: The Ser...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New