I am making an app on Heroku to which the build succeeded however crashed.
GitHub repo: https://github.com/hokole/numerology-life-path-date-calculator-test App: https://calendarhokole.herokuapp.com/
The buildpack detected is node.js.
Build Log:
-----> Building on the Heroku-20 stack
-----> Determining which buildpack to use for this app
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 16.x
engines.npm (package.json): unspecified (use default)
Resolving node version 16.x...
Downloading and installing node 16.14.2...
Using default npm version: 8.5.0
-----> Restoring cache
- node_modules (not cached - skipping)
-----> Installing dependencies
Installing node modules (package.json)
up to date, audited 1 package in 204ms
found 0 vulnerabilities
-----> Build
-----> Caching build
- node_modules (nothing to cache)
-----> Pruning devDependencies
up to date, audited 1 package in 189ms
found 0 vulnerabilities
-----> Build succeeded!
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 31.4M
-----> Launching...
Released v16
https://calendarhokole.herokuapp.com/ deployed to Heroku
Logs:
C:\Users\hokop>heroku logs --tail -a calendarhokole
ยป Warning: heroku update available from 7.53.0 to 7.59.4.
2022-04-04T05:09:21.359299+00:00 app[api]: Release v13 created by user hokole551@gmail.com
2022-04-04T05:09:21.359299+00:00 app[api]: Deploy d04d78a3 by user hokole551@gmail.com
2022-04-04T05:09:21.690572+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-04T05:09:23.196862+00:00 heroku[web.1]: Starting process with command `npm start`
2022-04-04T05:09:24.366381+00:00 app[web.1]: npm ERR! Missing script: "start"
2022-04-04T05:09:24.366432+00:00 app[web.1]: npm ERR!
2022-04-04T05:09:24.366584+00:00 app[web.1]: npm ERR! Did you mean one of these?
2022-04-04T05:09:24.366724+00:00 app[web.1]: npm ERR! npm star # Mark your favorite packages
2022-04-04T05:09:24.366818+00:00 app[web.1]: npm ERR! npm stars # View packages marked as favorites
2022-04-04T05:09:24.366855+00:00 app[web.1]: npm ERR!
2022-04-04T05:09:24.366887+00:00 app[web.1]: npm ERR! To see a list of scripts, run:
2022-04-04T05:09:24.366922+00:00 app[web.1]: npm ERR! npm run
2022-04-04T05:09:24.368138+00:00 app[web.1]:
2022-04-04T05:09:24.368276+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-04-04T05:09:24.368377+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-04-04T05_09_24_185Z-debug-0.log
2022-04-04T05:09:24.504280+00:00 heroku[web.1]: Process exited with status 1
2022-04-04T05:09:24.570131+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-04T05:09:24.574021+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-04T05:09:26.379938+00:00 heroku[web.1]: Starting process with command `npm start`
2022-04-04T05:09:29.064304+00:00 app[web.1]: npm ERR! Missing script: "start"
2022-04-04T05:09:29.064370+00:00 app[web.1]: npm ERR!
2022-04-04T05:09:29.064486+00:00 app[web.1]: npm ERR! Did you mean one of these?
2022-04-04T05:09:29.064594+00:00 app[web.1]: npm ERR! npm star # Mark your favorite packages
2022-04-04T05:09:29.064697+00:00 app[web.1]: npm ERR! npm stars # View packages marked as favorites
2022-04-04T05:09:29.064728+00:00 app[web.1]: npm ERR!
2022-04-04T05:09:29.064764+00:00 app[web.1]: npm ERR! To see a list of scripts, run:
2022-04-04T05:09:29.064799+00:00 app[web.1]: npm ERR! npm run
2022-04-04T05:09:29.066051+00:00 app[web.1]:
2022-04-04T05:09:29.066192+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-04-04T05:09:29.066312+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-04-04T05_09_28_774Z-debug-0.log
2022-04-04T05:09:29.221027+00:00 heroku[web.1]: Process exited with status 1
2022-04-04T05:09:29.351729+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-04T05:09:30.755897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=09016c1c-4a12-4780-a02e-bb954d5c2d46 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:09:32.074439+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=b50f43ce-ad7b-49ef-aa2c-f0ab0460d781 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:25.706521+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=3b24b01b-e719-43fe-a4f3-86865af970eb fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:26.000000+00:00 app[api]: Build started by user hokole551@gmail.com
2022-04-04T05:11:26.854743+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=ac59d45c-a5bd-4a50-8bb9-96323ab4ccbe fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:39.000000+00:00 app[api]: Build succeeded
2022-04-04T05:11:39.070574+00:00 app[api]: Deploy a4c9edf1 by user hokole551@gmail.com
2022-04-04T05:11:39.070574+00:00 app[api]: Release v14 created by user hokole551@gmail.com
2022-04-04T05:11:39.406932+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-04T05:11:43.048396+00:00 heroku[web.1]: Starting process with command `npm start`
2022-04-04T05:11:44.311738+00:00 app[web.1]: npm ERR! Missing script: "start"
2022-04-04T05:11:44.311816+00:00 app[web.1]: npm ERR!
2022-04-04T05:11:44.311965+00:00 app[web.1]: npm ERR! Did you mean one of these?
2022-04-04T05:11:44.312081+00:00 app[web.1]: npm ERR! npm star # Mark your favorite packages
2022-04-04T05:11:44.312205+00:00 app[web.1]: npm ERR! npm stars # View packages marked as favorites
2022-04-04T05:11:44.312241+00:00 app[web.1]: npm ERR!
2022-04-04T05:11:44.312283+00:00 app[web.1]: npm ERR! To see a list of scripts, run:
2022-04-04T05:11:44.312321+00:00 app[web.1]: npm ERR! npm run
2022-04-04T05:11:44.313417+00:00 app[web.1]:
2022-04-04T05:11:44.313543+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-04-04T05:11:44.313656+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-04-04T05_11_44_120Z-debug-0.log
2022-04-04T05:11:44.454227+00:00 heroku[web.1]: Process exited with status 1
2022-04-04T05:11:44.517290+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-04T05:11:48.267970+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=ee0ea98c-5ab4-4aab-bb46-97c9e78337fc fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:49.212455+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=7f8ee412-7801-4602-959f-1a92dd24ba65 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:49.924349+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=7868ebcd-3d16-420e-b626-9200cc85c58f fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:50.882155+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=60162889-7539-478a-b442-7b6a954edeb0 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:11:51.508087+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=720efe7b-0241-4a52-815f-a7fe47e93ec8 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:22:12.000000+00:00 app[api]: Build started by user hokole551@gmail.com
2022-04-04T05:22:24.000000+00:00 app[api]: Build succeeded
2022-04-04T05:22:24.093028+00:00 app[api]: Deploy 9bb9da95 by user hokole551@gmail.com
2022-04-04T05:22:24.093028+00:00 app[api]: Release v15 created by user hokole551@gmail.com
2022-04-04T05:22:24.559855+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-04T05:22:26.358404+00:00 heroku[web.1]: Starting process with command `node script.js`
2022-04-04T05:22:27.724303+00:00 app[web.1]: /app/script.js:3
2022-04-04T05:22:27.724442+00:00 app[web.1]: let events = localStorage.getItem("events")
2022-04-04T05:22:27.724446+00:00 app[web.1]: ^
2022-04-04T05:22:27.724447+00:00 app[web.1]:
2022-04-04T05:22:27.724447+00:00 app[web.1]: ReferenceError: localStorage is not defined
2022-04-04T05:22:27.724447+00:00 app[web.1]: at Object.<anonymous> (/app/script.js:3:14)
2022-04-04T05:22:27.724450+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-04T05:22:27.724451+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-04T05:22:27.724454+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-04-04T05:22:27.724455+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-04-04T05:22:27.724458+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
2022-04-04T05:22:27.724458+00:00 app[web.1]: at node:internal/main/run_main_module:17:47
2022-04-04T05:22:27.887097+00:00 heroku[web.1]: Process exited with status 1
2022-04-04T05:22:28.032799+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-04T05:22:28.038997+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-04T05:22:28.433771+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=06543399-6b41-48e6-9573-d68dc1595c04 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:22:30.068536+00:00 heroku[web.1]: Starting process with command `node script.js`
2022-04-04T05:22:31.931016+00:00 app[web.1]: /app/script.js:3
2022-04-04T05:22:31.931027+00:00 app[web.1]: let events = localStorage.getItem("events")
2022-04-04T05:22:31.931028+00:00 app[web.1]: ^
2022-04-04T05:22:31.931028+00:00 app[web.1]:
2022-04-04T05:22:31.931028+00:00 app[web.1]: ReferenceError: localStorage is not defined
2022-04-04T05:22:31.931028+00:00 app[web.1]: at Object.<anonymous> (/app/script.js:3:14)
2022-04-04T05:22:31.931029+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-04T05:22:31.931029+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-04T05:22:31.931030+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-04-04T05:22:31.931030+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-04-04T05:22:31.931030+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
2022-04-04T05:22:31.931031+00:00 app[web.1]: at node:internal/main/run_main_module:17:47
2022-04-04T05:22:32.098011+00:00 heroku[web.1]: Process exited with status 1
2022-04-04T05:22:32.196585+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-04T05:22:33.145206+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=db949b19-c7b6-4169-a0e0-001004c6b255 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:38:25.471353+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=calendarhokole.herokuapp.com request_id=3c9dfa6b-4014-4bab-af92-e25fba7c3f59 fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
2022-04-04T05:38:27.049215+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=calendarhokole.herokuapp.com request_id=0bd3f278-ff5b-4805-b1a2-82639c8bd85b fwd="104.54.13.160" dyno= connect= service= status=503 bytes= protocol=https
I debugged the code in Visual Studio with no problems. I included a procfile.
web: node script.js