Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck generating types in CLI #19

Closed
negativems opened this issue Sep 2, 2023 · 4 comments · Fixed by #21
Closed

Stuck generating types in CLI #19

negativems opened this issue Sep 2, 2023 · 4 comments · Fixed by #21

Comments

@negativems
Copy link

Nuxt gets stuck when generating types, and removing nuxt-mongoose fixes the issue.

image

I tried:

  • using npm instead of pnpm
  • deleting node_modules and .nuxt
  • Also tried it on a different computer with no success.

Additionally, I attempted to deploy it on Vercel and encountered the same issue.

I still face this problem even when removing all files that have the implementation of the module but the issue occurs only when I have it on nuxt.config.ts.

I also attempted to downgrade Nuxt from version 3.7.0 to 3.6.5, but this did not resolve the issue.

I found a similar issue here, and they suggested it might be related to the modules and not Nuxt itself:
nuxt/cli#169

@TgMrP
Copy link

TgMrP commented Sep 5, 2023

I have the same problem

@mariagq777
Copy link

Me too... the same issue :(

@leaderit
Copy link

leaderit commented Sep 9, 2023

And me (

For this times the only work around for me is

comment uri parameter in moongoose settings, like this:

mongoose: {
    // uri: 'mongodb://'+ ( process.env.MONGODB_URL || 'localhost:27017' ),
    options: {
        dbName:'db_name'
    },
    modelsDir: 'models',
},

I've had a warning:

WARN Missing MONGODB_URI in .env

and

✔ Types generated in .nuxt

is OK.

MONGODB_URI variable in your enviroment MUST NOT be set too.

The problem looks like mongoose try to connect a database server and do something with a server when types generate...

wbr, Valerii

ps: and, unfortunaly, it stops production build via 'npm build' too .

@arashsheyda
Copy link
Owner

Sorry I was away for a while and didn't have internet access :( It is probably caused by updates, and I'll try to fix it asap

@arashsheyda arashsheyda linked a pull request Sep 20, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants