pm2 code: 'ERR_REQUIRE_ESM' trouble

pm2, typescript, javascript, ESM

  • If your package.json files contains type:modules u have to use ecosystem.config.cjs instead ecosystem.config.js

// ecosystem.config.cjs
module.exports = {
	apps: [
		{
			name: "notion-server",
			script: "./out/app.js",
			watch: true,
		},
	],
}

Last updated

© 2024 ~ Yunus Emre Ak ~ yEmreAk