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

前端 未结 2 418
悲哀的现实
悲哀的现实 2021-01-05 19:48

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

 \"dependencies\": 
{
    \"express\": \"~4.4.0         


        
2条回答
  •  情话喂你
    2021-01-05 20:08

    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.

提交回复
热议问题