How to properly setup mongoose without external modules
I am using nuxt server plugins to create a connection to the database using mongoose and closing the connections with nuxt hooks 'close' event. Now everything is working fine as expected in dev.
But as soon as i run pnmp run build, the process gets stuck and i need to manually exit the process using ctrl + c after which I run the node output command to run the localhost in production mode
That was all fine until I had to deploy the same thing on nuxt amplify, which after getting stuck on nuxt build, times out.
Can someone help me here? I have the same config and everything as is, working in NUXT3, only upgraded as I had to also upgrade node version because amplify is stopping support for node 18 after mid September
But as soon as i run pnmp run build, the process gets stuck and i need to manually exit the process using ctrl + c after which I run the node output command to run the localhost in production mode
That was all fine until I had to deploy the same thing on nuxt amplify, which after getting stuck on nuxt build, times out.
Can someone help me here? I have the same config and everything as is, working in NUXT3, only upgraded as I had to also upgrade node version because amplify is stopping support for node 18 after mid September
