Skip to content

Failed to deploy server to Heroku. Please help!!! #104

Description

@jhan125

Questions:

  1. I am not sure if it's because the server failed to add a user, according to the log message below.

at Object.<anonymous> (/app/node_modules/mongodb/lib/operations/add_user.js:6:17)

  1. Is there a way to search Unexpected token in my code?

See heroku deploy logs below

2022-03-30T04:28:43.632666+00:00 heroku[web.1]: Starting process with command `npm start`
2022-03-30T04:28:44.801992+00:00 app[web.1]: 
2022-03-30T04:28:44.802007+00:00 app[web.1]: > server@1.0.0 start /app
2022-03-30T04:28:44.802007+00:00 app[web.1]: > node index.js
2022-03-30T04:28:44.802008+00:00 app[web.1]: 
2022-03-30T04:28:44.938286+00:00 app[web.1]: /app/node_modules/mongodb/lib/utils.js:137
2022-03-30T04:28:44.938288+00:00 app[web.1]: return { ...target, ...source };
2022-03-30T04:28:44.938288+00:00 app[web.1]: ^^^
2022-03-30T04:28:44.938289+00:00 app[web.1]: 
2022-03-30T04:28:44.938289+00:00 app[web.1]: SyntaxError: Unexpected token ...
2022-03-30T04:28:44.938290+00:00 app[web.1]: at createScript (vm.js:74:10)
2022-03-30T04:28:44.938290+00:00 app[web.1]: at Object.runInThisContext (vm.js:116:10)
2022-03-30T04:28:44.938290+00:00 app[web.1]: at Module._compile (module.js:533:28)
2022-03-30T04:28:44.938291+00:00 app[web.1]: at Object.Module._extensions..js (module.js:580:10)
2022-03-30T04:28:44.938291+00:00 app[web.1]: at Module.load (module.js:503:32)
2022-03-30T04:28:44.938292+00:00 app[web.1]: at tryModuleLoad (module.js:466:12)
2022-03-30T04:28:44.938292+00:00 app[web.1]: at Function.Module._load (module.js:458:3)
2022-03-30T04:28:44.938292+00:00 app[web.1]: at Module.require (module.js:513:17)
2022-03-30T04:28:44.938292+00:00 app[web.1]: at require (internal/module.js:11:18)
**2022-03-30T04:28:44.938293+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/mongodb/lib/operations/add_user.js:6:17)**
2022-03-30T04:28:45.035896+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2022-03-30T04:28:45.035975+00:00 app[web.1]: npm ERR! errno 1
2022-03-30T04:28:45.036041+00:00 app[web.1]: npm ERR! server@1.0.0 start: `node index.js`
2022-03-30T04:28:45.036074+00:00 app[web.1]: npm ERR! Exit status 1
2022-03-30T04:28:45.036120+00:00 app[web.1]: npm ERR!
2022-03-30T04:28:45.036171+00:00 app[web.1]: npm ERR! Failed at the server@1.0.0 start script.
2022-03-30T04:28:45.036213+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2022-03-30T04:28:45.036860+00:00 app[web.1]: 
2022-03-30T04:28:45.036959+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-03-30T04:28:45.037000+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2022-03-30T04_28_44_944Z-debug.log
2022-03-30T04:28:45.168628+00:00 heroku[web.1]: Process exited with status 1
2022-03-30T04:28:45.387519+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-30T04:28:50.738161+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-reaches-87851.herokuapp.com request_id=f249d63e-fdea-4fb6-999d-e56a579b0fe6 fwd="24.130.214.206" dyno= connect= service= status=503 bytes= protocol=https
2022-03-30T04:29:27.954795+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-reaches-87851.herokuapp.com request_id=c2af203d-401f-4764-bdf8-05055c4a56b8 fwd="24.130.214.206" dyno= connect= service= status=503 bytes= protocol=https

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions