当我使用node v6.x和pm2启动服务时,会出现错误:
TypeError: Iterator result <!DOCTYPE html>
....
</html> is not an object
at Object.app.context.render (/Users/..../project/node_modules/koa-ejs/index.js:98:23)
at next (native)
at onFulfilled (/Users/..../project/node_modules/co/index.js:65:19)
但在以下任何一种情况下我都不会收到此错误:
- 带有 pm2 的 Node v4.x
- 没有 pm2 的 Node v6.x
我想知道是什么原因导致这个错误?
最佳答案
当您使用 Node v6.x 时,尝试启动不带 args
的 pm2
:
-node-args="--harmony"
关于node.js - 使用 Node v6.x 和 pm2 导致 koa-ejs 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39975047/