Error: Cannot find module '/app/index.js' - heroku

戏子无情 提交于 2019-12-25 02:48:09

问题


I'm a beginner using Heroku and I have a problem: When I write git push heroku master in my terminal prompt, I'm getting an error: Error: Cannot find module '/app/index.js' I don't really know what I did wrong. In the Procfile: web: node index.js In the package.json:

{
     "name": "the-chat",
     "version": "1.0.0",
     "description": "",
     "main": "index.js",
     "scripts": {
       "test": "node index.js",
       "start": "node index.js"
     },
     "keywords": [],
     "author": "",
     "license": "ISC",
     "dependencies": {
       "express": "^4.16.4",
       "grawlix": "^1.0.6",
       "jquery": "^3.3.1",
       "socket.io": "^2.2.0"
     }
   }

And the files: https://i.imgur.com/x9YtouF.png Anyone knows what's the problem? It would really help me, thanks!

来源:https://stackoverflow.com/questions/54391770/error-cannot-find-module-app-index-js-heroku

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