Heroku deploy using ts-node

Joao Garin picture Joao Garin · Dec 11, 2015 · Viewed 8.3k times · Source

I am trying to deploy a sample of the Angular Universal Starter in Heroku.

The task npm start fails because it does not recognize ts-node.

Is there a way to make deployment on Heroku work using ts-node?

Answer

BrunoLM picture BrunoLM · Aug 17, 2017

You can create a Procfile with

web: npm start

And have your start script to run ts-node

"start": "ts-node src/index.ts",

And install typescript and ts-node on your dependencies

"ts-node": "^3.3.0",
"typescript": "^2.4.2"