I just can’t seem to deploy my node app with PM2 because of ESM. If I ssh directly into the server and run “pm2 start” manually it works fine because it picks up my ESM compatible ecosystem file. It seems there’s no way to use that with Cleavr so I’m stuck with the Cleavr ecosystem file. I’ve tried all the tricks I can find online like adding node_args: “–loader ts-node/esm” and stuff like that but I just can’t seem to get it to work. I really need to get a deployment out soon and I do not want to switch back to Azure. Cleavr would be great but this is killing me.
On further inspection the Cleavr inspection uses .cjs extension which should work… So now I’m not sure what the problem is. Digging further but if anyone has any relevant information I’d highly appreciate some help. I’m trying to deploy SvelteKit.
Fixed it by following the advice in this thread: Sveltekit with adapter-node - #5 by romanw
Not sure why that works but it does.
1 Like
Thanks for following up with the fix!