dev-zuo 技术日常
Github

pm2 process.yml You cannot define a mapping item when in a sequence

这篇文章发布于 2020/11/23,归类于
标签:
pm2 process.yml

使用 pm2 运行 node 项目,pm2 start process.yml 后提示 You cannot define a mapping item when in a sequence,是 process.yml 配置文件的问题,修改下配置文件即可

// cat process.yml
apps:
  - script: app.js 
  instances: 2
  watch: true
  env:
    NODE_ENV: production

- script: app.js 改为 script: app.js 重新运行就可以了

参考: “You cannot define a mapping item when in a sequence” when running phpunit in symfony | Stack overflow