0

i want to deploy this application https://github.com/thefailtheory/neofreelance i am developping on my http://livecoding.tv channel to heroku but i am facing an error

the application is basic it will try to solve a problem on freelancing in the cloud i use everyday

here is the log :

2016-11-22T16:20:34.454131+00:00 app[web.1]: npm ERR! code ELIFECYCLE

2016-11-22T16:20:34.454297+00:00 app[web.1]: npm ERR! [email protected] start: `node app.js`

2016-11-22T16:20:34.454450+00:00 app[web.1]: npm ERR! Exit status 1

2016-11-22T16:20:34.454616+00:00 app[web.1]: npm ERR! 

2016-11-22T16:20:34.454772+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script 'node app.js'.

2016-11-22T16:20:34.454931+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.

2016-11-22T16:20:34.455081+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the neofreelance package,

2016-11-22T16:20:34.455232+00:00 app[web.1]: npm ERR! not with npm itself.

2016-11-22T16:20:34.455378+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:

2016-11-22T16:20:34.455537+00:00 app[web.1]: npm ERR!     node app.js

2016-11-22T16:20:34.455684+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:

2016-11-22T16:20:34.455833+00:00 app[web.1]: npm ERR!     npm bugs neofreelance

2016-11-22T16:20:34.456007+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:

2016-11-22T16:20:34.456156+00:00 app[web.1]: npm ERR!     npm owner ls neofreelance

2016-11-22T16:20:34.456302+00:00 app[web.1]: npm ERR! There is likely additional logging output above.

2016-11-22T16:20:34.459887+00:00 app[web.1]: 

2016-11-22T16:20:34.460174+00:00 app[web.1]: npm ERR! Please include the following file with any support request:

2016-11-22T16:20:34.460356+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
4
  • You have no Procfile? Commented Nov 22, 2016 at 16:35
  • i have deployed an app via dropbox it worked without it, i should have one with nodejs ? Commented Nov 22, 2016 at 16:36
  • It is working but I don't think it's safe to rely on default behaviors (i.e. Heroku will by default run npm start). Commented Nov 22, 2016 at 16:42
  • i don't know too i am trying heroku with node these day because it's really funny to play with this kind of technology Commented Nov 22, 2016 at 16:52

1 Answer 1

1

That is because Block-scoped declarations (let, const) are not yet supported in the Node version Heroku is using outside of strict mode.

So two options:

  • Add "use strict"; at the beginning of your file
  • Use var and not let.
Sign up to request clarification or add additional context in comments.

5 Comments

let worked fine with another project and a deployment with dropbox, so i am going to try the first option
oh i see it's you use var and without use strict it works or you add use strict and you can code with let
Yes. Or maybe you can specify a Node version that would accept let without strict mode. I don't know if Heroku would have it though.
i would stay in simple way and use var but let gives a certain style in the code like avoiding ; or give a try to a specific version of node should be a nice feature to test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.