问题
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