Node.js Expres.js Heroku Toolbelt >Foreman Start - Error: write EINVAL

元气小坏坏 提交于 2019-12-19 03:13:17

问题


This is the error I encountered with package.json when running foreman start with Heroku Toolbelt for Node.js

 "dependencies": 
{
    "express": "~4.4.0",
    "jade": "~1.3.1"
}


回答1:


I had the same issues as Jek. I was using express 4.4.4. I downgraded express 3.2.6 and it worked, but I shouldn't be forced to use an older version of express just because foreman doesn't support it.

I tried node-foreman. And it worked for me. I followed the instructions that included these steps:

  1. npm install -g foreman
  2. nf start

I would like to know if anyone has additional suggestions.




回答2:


I managed to fix this issue by changing express version to 3.2.6 as seen below

 "dependencies": 
{
    "express": "~3.2.6",
    "jade": "~1.3.1"
}

Then I deleted node_modules and did a npm install. Following this a foreman start works perfectly fine.

However I have no idea why it doesn't work when it runs on express 4 but it works when running on express 3.



来源:https://stackoverflow.com/questions/24015393/node-js-expres-js-heroku-toolbelt-foreman-start-error-write-einval

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!