Closed CptJJ closed 4 days ago
Might have been an issue with pnpm brought up when i upgraded to 3.8? built with bun and it went away... strange...
I'm also getting an issue that seems to come from the Supabase Module. I'm using Nuxt 3.8 with Node.js runtime. Cannot find module './lib/websocket' Require stack: - ~\nuxt-app\websocket
I'm having a similar issue with Nuxt 3.8 and also back ported to 3.7 and same error. Did a full package clean and restore.
PostgrestBuilder.ts:2 Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/@supabase+node-fetch@2.6.14/node_modules/@supabase/node-fetch/browser.js?v=a82b1307' does not provide an export named 'default' (at PostgrestBuilder.ts:2:8)
I'm getting no errors in the dev server, just the one above in the browser console.
Have the same error when using pnpm, nuxt@^3.11.2
and @nuxtjs/supabase@^1.2.0
.
Setting shamefully-hoist=true
in .npmrc
solves this though.
Thanks @madebyfabian, this solved my problem with
WARN Failed to resolve dependency: @supabase/gotrue-js, present in 'optimizeDeps.include'
What I did:
.npmrc
-file in the root of my projectshamefully-hoist=true
to itnpm run dev
again
Voilá, no more warning!The content of my .npmrc
-file:
# https://pnpm.io/npmrc#shamefully-hoist
# Fixes: WARN Failed to resolve dependency: @supabase/gotrue-js, present in 'optimizeDeps.include'
shamefully-hoist=true
Not clear to me why this worked with npm since it seems to me to be an pnpm-setting 🤷 Read more about the setting here https://pnpm.io/npmrc#shamefully-hoist
I have same npm config, but this warning still exists in latest nuxt version.
------------------------------
- Operating System: Linux
- Node Version: v20.11.1
- Nuxt Version: 3.11.2
- CLI Version: 3.11.1
- Nitro Version: 2.9.6
- Package Manager: pnpm@9.0.6
- Builder: -
- User Config: colorMode, css, devtools, experimental, extends, eslint, fonts, hooks, i18n, image, imports, modules, nitro, pinia, router, routeRules, runtimeConfig, security, seo, ssr, studio, supabase, telemetry, typescript, ui, features
- Runtime Modules: @nuxt/content@2.12.1, @nuxt/eslint@0.3.10, @nuxt/fonts@0.6.1, @nuxt/image@1.6.0, @nuxt/ui@2.15.2, @nuxthq/studio@1.0.13, @nuxtjs/seo@2.0.0-rc.10, @nuxtjs/supabase@1.2.1,@pinia/nuxt@0.5.1, @unlok-co/nuxt-stripe@3.0.0, @vueuse/nuxt@10.9.0, nuxt-og-image@2.2.4, nuxt-security@1.4.3, @nuxtjs/i18n@8.3.1
- Build Modules: -
------------------------------
bash
WARN Failed to resolve dependency: @supabase/gotrue-js, present in 'optimizeDeps.include'
vite: { ...oldCode, optimizeDeps: { include: ['@supabase/gotrue-js'] }, }
You might need to do something like @nuxtjs/supabase > @supabase/gotrue-js
if this is a dependency of the module. Vite requires anything in optimizeDeps.include to be accessible within top-level node_modules which will be only true for pnpm users if they have installed it separately.
Just to clarify, I am using pnpm
, but installing @supabase/gotrue-js
does not solve this issue.
Might be fixed by the last release.
Nuxt 3.8 warns about possible broken modules: "You may also encounter modules in the Nuxt ecosystem that need to be updated; please open an issue for those modules. I'm also very happy to help if you're encountering any problems with this, if you're a module author. Just tag me and I'll take a look."
I get this when launching the dev server:
and then get the error:
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/@supabase+node-fetch@2.6.14/node_modules/@supabase/node-fetch/browser.js?v=0907fba1' does not provide an export named 'default' (at PostgrestBuilder.ts:2:8)
@danielroe