I am experiencing an issue with my simple angular 6 app after deploying it to Heroku. When I check the logs using the command heroku logs
, I encounter the following error:
2018-07-15T00:45:51.000000+00:00 app[api]: Build succeeded
2018-07-15T00:45:53.901220+00:00 heroku[web.1]: Starting process with command `npm start`
2018-07-15T00:45:56.221740+00:00 heroku[web.1]: Process exited with status 1
... (error log continues)
Inspecting my package.json file, I have defined the "start" script as "ng serve"
. Here is a snippet of my package.json:
{
"name": "product-client",
"version": "0.0.0",
... (dependencies and scripts continue)
}
In addition, my Procfile specifies the worker as ng serve
. The directory structure of my project looks like this:
└───src
├───app
│ ├───app-routing
│ ├───product-detail
... (directory structure continues)
Note that my application is a basic Angular landing page without any REST API integration.
Question:
What could be causing the error in deployment on Heroku despite the code working fine locally?