logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
67 stars 40 forks source link

bug: @logto/nuxt cannot work properly #647

Closed SOVLOOKUP closed 8 months ago

SOVLOOKUP commented 8 months ago

Describe the bug

I've tried using the logto sdk in a nuxt app but it doesn't load the nuxt module properly.

 ERROR  [worker reload] [worker init] defineEventHandler is not defined                                    01:36:29  

  at <anonymous> (node_modules\.pnpm\@logto+nuxt@0.1.0\node_modules\@logto\nuxt\dist\runtime\server\event-handler.mjs:3:16)
  at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
  at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
  at async loadESM (node:internal/process/esm_loader:40:7)
  at async handleMainPromise (node:internal/modules/run_main:66:12)

Expected behavior

The logto nuxt module works normally

How to reproduce?

  1. nuxi init
  2. Follow https://docs.logto.io/sdk/nuxt/ to introduce the logto module
  3. npm run dev

    Context

Screenshots

image

KevinLeneschmidt commented 8 months ago

Same...

KevinLeneschmidt commented 8 months ago

Same...

gao-sun commented 8 months ago

@SOVLOOKUP @KevinLeneschmidt does the latest version work for you?

KevinLeneschmidt commented 8 months ago

@SOVLOOKUP @KevinLeneschmidt does the latest version work for you?

Yes!