image icon indicating copy to clipboard operation
image copied to clipboard

npm run generate never exits process when using @nuxt/image

Open ElnuDev opened this issue 4 years ago • 1 comments

I'm having an issue where npm run generate never exits the process even after it is done generating all the static images and the rest of the site. I didn't have this issue before using @nuxt/image. What can one do to fix this? Thank you!

ElnuDev avatar Aug 11 '21 00:08 ElnuDev

I found the solution to this issue ,

this is happening because you mist be connecting to a db in your server , you need to close the db connection using nuxt hooks inside nuxt.config.ts. file

hooks: { close: async (go: Nuxt) => { await mongoose.disconnect(); }, },

AamirAlam avatar Jan 18 '24 19:01 AamirAlam