nuxt-modules / supabase

Supabase module for Nuxt.
https://supabase.nuxtjs.org
MIT License
642 stars 120 forks source link

Error during installation with Bun #324

Open bkammer opened 6 months ago

bkammer commented 6 months ago

Version

@nuxtjs/supabase: "^1.1.5", nuxt: "^3.9.1"

Steps to reproduce

Follow get started guide with bun: http://supabase.nuxtjs.org/get-started

What is Expected?

Successful installation.

What is actually happening?

When running: bun run dev -o

$ nuxt dev -o
Nuxt 3.9.2 with Nitro 2.8.1
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose
  ➜ DevTools: press Shift + Alt + D in the browser (v1.0.8)

ERROR  Cannot start nuxt:  ResolveMessage {} 

Idea to solve the issue:

rm -rf node_modules/
rm bun.lockb 
bun i

But then:

[2.40ms] ".env"
bun install v1.0.23 (83f2432d)
  ⚙️  nuxt-app [3/3] 
ERROR  ResolveMessage {} 
ERROR  Cannot find module "./server/services" from "/workspaces/testingNuxtJs/index.js"
error: postinstall script from "nuxt-app" exited with 1

If I use npm instead of bun everything works fine.

lafllamme commented 4 months ago

Same Issue here, any update?

Using bun to setting up, regardlich which way, always results in:
[+] Running 1/0
 ✔ Container baka-stream-nuxt-app  Created                                                                                                                                         0.0s 
Attaching to baka-stream-nuxt-app
baka-stream-nuxt-app  | [0.07ms] ".env"
baka-stream-nuxt-app  | bun install v1.0.32 (5fec71bd)
baka-stream-nuxt-app  |  Resolving dependencies
baka-stream-nuxt-app  |  Resolved, downloaded and extracted [1]
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  |  ERROR  ResolveMessage {} 
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  |  ERROR  Cannot find module "./server/services" from "/app/index.js"
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  | 
baka-stream-nuxt-app  | error: postinstall script from "-���c4�3" exited with 1
baka-stream-nuxt-app exited with code 0
g1ronn1mo commented 4 months ago

This worked for me at some point. I think this is a bun version problem. I will try to downgrade bun or @nuxtjs/supabase.

I downgraded to 1.0.7 and got:

 ERROR  undefined is not an object (evaluating 'report.getReport')                                                                    8:13:54 PM

  at isMusl (/home/bschwab/projects/nuxt-monorepo/node_modules/nitropack/node_modules/rollup/dist/native.js:6:6)
  at getPackageBase (/home/bschwab/projects/nuxt-monorepo/node_modules/nitropack/node_modules/rollup/dist/native.js:60:18)
  at <anonymous> (/home/bschwab/projects/nuxt-monorepo/node_modules/nitropack/node_modules/rollup/dist/native.js:36:5)
  at global code (/home/bschwab/projects/nuxt-monorepo/node_modules/nitropack/node_modules/rollup/dist/native.js:70:8)
  at processTicksAndRejections (:61:39) 
selemondev commented 2 months ago

Upgrade to:

  1. bun version 1.1.8 by running the command bun upgrade

  2. nuxt version 3.11.2

  3. @nuxtjs/supabase version to 1.2.2