Closed negativems closed 9 months ago
I have the same problem
Me too... the same issue :(
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 .
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
Nuxt gets stuck when generating types, and removing nuxt-mongoose fixes the issue.
I tried:
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: https://github.com/nuxt/cli/issues/169