question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

forever start ts-node

See original GitHub issue

I am trying to run my Typescript app, with command forever start -v -c ts-node /src/index.ts and it was say running, but when I run forever list it was nothing my app running, not list can I know why? do I make something wrong command ?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:11
  • Comments:5

github_iconTop GitHub Comments

4reactions
Aximemcommented, May 9, 2020

Same issue for me, I managed to make it work by setting a script in my package.json:

"start:staging": "ts-node src/app.ts"

And use it with forever:

forever start -c "npm run start:staging" ./

3reactions
kelvinsantoscommented, Jan 9, 2021

I got the same issue. I managed to solve it by installing ts-node globally.

npm install -g ts-node
NODE_ENV=production forever start --minUptime 1000 --spinSleepTime 1000 -c ts-node src/queue-runners/email-notification-consumer.ts

or use the ts-node directly from node_modules folder

NODE_ENV=production forever start --minUptime 1000 --spinSleepTime 1000 -c node_modules/ts-node/dist/bin.js src/queue-runners/email-notification-consumer.ts
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run Typescript files on Server in background?
You could use forever in combination with ts-node . Here is a link to the npm package ts-node. I would suggest using the...
Read more >
Running Node.js scripts continuously using forever
Forever is an npm module that ensures a Node.js script continuously runs in the background on the server. It's a helpful CLI tool...
Read more >
forever - npm
A simple CLI tool for ensuring that a given node script runs continuously (i.e. forever). Latest version: 4.0.3, last published: a year ago....
Read more >
How To Run TypeScript Scripts with ts-node - DigitalOcean
json tutorial; Familiarity with TypeScript. This How To Set Up a New TypeScript Project article is a great place to start. Step 1...
Read more >
forever vs nodemon vs ts-node vs tsc-watch | npm trends
forever vs nodemon vs ts-node vs tsc-watch · forever · nodemon · ts-node · tsc-watch.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found