Cannot execute Node.js app on Heroku successfully (crashes each time)

烂漫一生 提交于 2019-12-01 07:33:34

It appears you are requiring express in your web.js, so why you do not add express to your dependencies? Your local copy may have express installed already, that's why you are not getting any error. Tower may require express, however, you cannot directly access express from it, it is a submodule in tower's directories, not in your app directory.

In the past this was a problem with a version of npm. I would recommend upgrading to the latest version and reinstalling at least express.

Check that you don't have express defined under devDependencies in package.json. If you do, even running npm install express --save will not move it to dependencies.

I had this issue with Vue.js project created with vue-cli, which added the express dep under devDependencies.

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