I
I
irvdev2017-08-17 07:01:15
JavaScript
irvdev, 2017-08-17 07:01:15

How to run babel-node via pm2?

Hello! I can't autostart the server via babel-node and pm2. Wrote a config file

{
  "apps" : [{
    "name"        : "homegrow",
    "script"      : "./apps/homegrow/server.js",
    "watch"       : true,
    "exec_interpreter" : "babel-node",
    "exec_mode"        : "fork",
  }]
}

I start from the root pm2 start apps/homegrow/pm2_config.json Writes
to the console:
[PM2][WARN] Applications homegrow not running, starting...
[PM2][ERROR] script not found : /home/irvdev/server.js
Not I can understand why he is looking for a file in the wrong folder. I've tried everything, what am I missing?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jenya7771, 2019-12-28
@jenya7771

"exec_interpreter": "./node_modules/.bin/babel-node"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question