Closed maxgaudin closed 8 years ago
Hmm, well I use convict
to validate the presence of environment variables. I would expect a more helpful error message than that when validation fails! You could look at config.js
to see what variables and values are expected, maybe you’re missing one, like the SLACK_TOKEN
?
I will look into getting a more useful error message out of convict
. Thanks for letting me know about this problem.
Actually it was throwing a error at some point with something like "expecing a string for SlackToken". I entered the token according to the README like so: SLACK_TOKEN=your_token
Okay, the only other required one without a default is DATABASE_URL
, do you have that?
Yes I gave it the DB URL as well. I had originally tried to deploy on Heroku but Heroku was not having any of that :)
Hmm! I have it deployed to Heroku and running. But the Deploy to Heroku button is probably broken.
It does seem like an environment variable thing. I tried running it without SLACK_TOKEN
and got this error:
/Users/b/Documents/Code/slack-statsbot/node_modules/convict/lib/convict.js:399
throw new Error(errBuf);
^
Error: slackToken: must be of type String
at Object.rv.validate (/Users/b/Documents/Code/slack-statsbot/node_modules/convict/lib/convict.js:399:15)
…
So it’s weird that your error message doesn’t say what the missing configuration variable is. Have you changed any of the other files? The configuration delegates to app.json
to get some of the variables out of the Heroku deployment.
I’m still into helping get this working if you like @maxgaudin, but in the absence of a response I’m going to close this issue!
I'm trying to deploy via Cloud 9 and get the following error after running 'npm start':
Thoughts?