PM2 Startup Error with Node and Typescript

If you decide to run PM2 to run your node server and you're using Typescript you can get this error: [PM2][ERROR] Interpreter .nvm/versions/node/v18.11.0/lib/node_modules/pm2/node_modules/.bin/ts-node is NOT AVAILABLE in PATH. (type 'which .nvm/versions/node/v18.11.0/lib/node_modules/pm2/node_modules/.bin/ts-node' to double check.) It can come in many forms but the important part is ts-node is NOT AVAILABLE in PATH. The fix for this …

TS-Node and ERR_LOADER_CHAIN_INCOMPLETE

Osiyo. Dohiju? ᎣᏏᏲ. ᏙᎯᏧ? Hey, welcome back. https://github.com/TypeStrong/ts-node/issues/1839 https://github.com/TypeStrong/ts-node/releases/tag/v10.9.1 https://github.com/DataDog/dd-trace-js/issues/2187 To Fix this I left Node at 18+ and updated ts-node to 10.9.1 and everything worked great