I am hosting a university project on heroku and i need to host a django app which also needs an npm library but i searched alot on how to do this and eventualy i thought i got the hand of it but now i am getting this error:
2018-06-14T10:19:22.798022+00:00 app[web.1]: throw err;
2018-06-14T10:19:22.798023+00:00 app[web.1]: ^
2018-06-14T10:19:22.798024+00:00 app[web.1]:
2018-06-14T10:19:22.798026+00:00 app[web.1]: Error: Cannot find module '/app/server.js'
2018-06-14T10:19:22.798028+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:547:15)
2018-06-14T10:19:22.798029+00:00 app[web.1]: at Function.Module._load (module.js:474:25)
2018-06-14T10:19:22.798030+00:00 app[web.1]: at Function.Module.runMain (module.js:693:10)
2018-06-14T10:19:22.798031+00:00 app[web.1]: at startup (bootstrap_node.js:191:16)
2018-06-14T10:19:22.798033+00:00 app[web.1]: at bootstrap_node.js:612:3
this is my package.json:
{
"name": "dpl-webtech",
"version": "1.0.0",
"description": "DBL - Webtech Group D24",
"main": "index.js",
"scripts": {
"start": "nf start"
},
"repository": {
"type": "git",
"url": "git+https://github.com/spiderangel123/DPL-WebTech.git"
},
"author": "Ahmad Alsarakbi",
"license": "ISC",
"bugs": {
"url": "https://github.com/spiderangel123/DPL-WebTech/issues"
},
"homepage": "https://github.com/spiderangel123/DPL-WebTech#readme",
"engines": {
"node": "8.11.2",
"npm": "6.1.0"
},
"dependencies": {
"npm": "^6.1.0",
"phantomjs-prebuilt": "^2.1.16"
}
}[![enter image description here][1]][1]
and here is my procfile:
web: gunicorn DBL.wsgi
web: node ./index.js
