Hebilicious / authjs-nuxt

AuthJS edge-compatible authentication Nuxt module.
https://authjs-nuxt.pages.dev/
MIT License
249 stars 28 forks source link

ERROR Cannot start nuxt: kit.writeTypes is not a function #90

Closed imcm7 closed 1 year ago

imcm7 commented 1 year ago

Environment

Nuxt project info:


Reproduction

New instaled nuxt with modules

Describe the bug

-Nuxt 3.7.1 with Nitro 2.6.3-28235083.5639f5b
ERROR Cannot start nuxt: kit.writeTypes is not a function

Additional context

No response

Logs

No response

FamilyMan commented 1 year ago

I also get this. My dependencies are:

"devDependencies": { "@hebilicious/authjs-nuxt": "^0.3.0-beta.2", "nuxt": "^3.7.1" }

Just having this and running "npm run dev" gives me the same error as above.

Hebilicious commented 1 year ago

I also get this. My dependencies are:

"devDependencies": { "@hebilicious/authjs-nuxt": "^0.3.0-beta.2", "nuxt": "^3.7.1" }

Just having this and running "npm run dev" gives me the same error as above.

Can you downgrade Nuxt to 3.7.0 and let me know if that fixes the issue for you ?

FamilyMan commented 1 year ago

Downgrading to 3.7.0 doesn't fix it, but downgrading to 3.6.5 does

Hebilicious commented 1 year ago

Downgrading to 3.7.0 doesn't fix it, but downgrading to 3.6.5 does

Thanks for the heads-up, we're investigating.

ray2ding commented 1 year ago

Downgrading to 3.7.0 doesn't fix it, but downgrading to 3.6.5 does

Thank you, downgrade to 3.6.5 works for me too

Hebilicious commented 1 year ago

@FamilyMan @ray2ding Btw if you guys have a reproduction that would be great. I tried to reproduce with nuxt 3.7.1 but no luck, everything works on my end : https://github.com/Hebilicious/nuxt-cli-module-issue

FamilyMan commented 1 year ago

Interesting. What version of Node are you using? I'm currently on 18.17.1 I will try 20.6.1 and see if that makes any difference.

Hebilicious commented 1 year ago

Interesting. What version of Node are you using? I'm currently on 18.17.1 I will try 20.6.1 and see if that makes any difference.

20.5.0, but I'm using bun, not node. Have you tried deleting your lockfiles and your node_modules?

FamilyMan commented 1 year ago

I can confirm that upgrading Node to 20.6.1, this fixes the issue. I can install this package and use Nuxt 3.7.1

Hebilicious commented 1 year ago

I can confirm that upgrading Node to 20.6.1, this fixes the issue. I can install this package and use Nuxt 3.7.1

That seems very odd ... Anyways let's track in https://github.com/nuxt/cli/issues/157 as this might not be related to this module

Hebilicious commented 1 year ago

fixed in https://github.com/nuxt/cli/pull/158