简体   繁体   English

Node-Red Pm2设置

[英]Node-Red Pm2 Setup

I am trying to start my node-red on a raspberry pi 2 using pm2. 我正在尝试使用pm2在树莓派2上启动我的node-red。 I am using the startup command: 我正在使用启动命令:

pm2 start /usr/bin/node-red-pi --node-args="--max-old-space-size=128" -- -v

At first it seems to work: 起初它似乎起作用:

NodeRed启动pm2

But unfortunatly then it errors: 但不幸的是,它会出错:

NodeRed错误pm2

Thats the log: 多数民众赞成在日志:

SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:28:21)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)

Please make sure you installed the latest PM2 version (>2.x): 请确保您安装了最新的PM2版本(> 2.x):

$ npm install pm2@latest -g
$ pm2 update

Then start node-red again, it should works as expected: 然后再次启动node-red,它应该可以正常工作:

pm2 start node-red --node-args="--max-old-space-size=128" -- -v 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM