簡體   English   中英

Node-Red Pm2設置

[英]Node-Red Pm2 Setup

我正在嘗試使用pm2在樹莓派2上啟動我的node-red。 我正在使用啟動命令:

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

起初它似乎起作用:

NodeRed啟動pm2

但不幸的是,它會出錯:

NodeRed錯誤pm2

多數民眾贊成在日志:

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)

請確保您安裝了最新的PM2版本(> 2.x):

$ npm install pm2@latest -g
$ pm2 update

然后再次啟動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