I've tried to create a app.json to enable Heroku button.
https://github.com/tkawachi/sslreminder/tree/btn
My app.json seems to be valid by app.json validate.
But it failed Configure Environment when I tried to deploy from this deploy URL.
How can I fix the failure, or investigate further.
Perhaps the BUILDPACK_URL is causing issues?
"BUILDPACK_URL": {
"description": "Ensure we use an updated go buildpack",
"value": "https://github.com/kr/heroku-buildpack-go.git"
},
Related
I am trying to deploy my app onto heroku, yet I receive a build erorr where it fails to install the dependencies using npm install. Is there anyway I can install with "legacy-peer-deps"?
Thank you so much...
I tried editing my procifile file with the following contents in it
web: npm install --legacy-peer-deps
web: npm start
Ideally, you should resolve the underlying dependency issue so your application works without this option. But you should be able to configure it by setting environment variable ("config var" in Heroku-speak).
I believe the legacy-peer-deps setting will do the trick:
heroku config:set NPM_CONFIG_LEGACY_PEER_DEPS=true
Then you'll need to redeploy.
Alternatively, you could add an .npmrc file to your project:
legacy-peer-deps = true
Commit it, then redeploy.
It is recommended to fix your dependency issues, but in case there's still the need to deploy it as is, the easiest way to do so would be the following:
Go to your app account on Heroku.
Go to settings.
Click on 'Reveal Config Vars'.
Add as key:
NPM_CONFIG_LEGACY_PEER_DEPS
Add as value:
true
Deploy
Good luck!
I get this error in my Deployment (Acceptance) Stage in the SAP Continuous Integration and Delievery Service.
I have a .pipeline/config.yml file in my project.
When I deploy "normal" with cf deploy in BAS everything works fine, so there is something wrong with the config.yml I guess. Before I also get some buildpack/node error, so I added this to my package.json:
But I don't know what "Staging error" should mean and why it only fails in my pipeline?
Some further errors in my logs:
Approuter in mta.yaml:
My package.json in approuter:
Does anyone have clue?
Kind regards
Sebastian
I specified a postdeploy script in my app.json. The build info in the heroku web interface shows "There was an issue while running the post deploy script."
{
"scripts": {
"postdeploy": "./bin/heroku_postdeploy"
},
How can I get the output / logs of my postdeploy script, to see what went wrong? heroku logsdoes not show the output.
When I run the postdeploy script via heroku CLI everything works fine.
In case of a failure of the dynos (in my case mixed paid and non paid dynos), the post deploy log is not displayed, although the error said the postdeploy script had an error. Heroku support figured that out. They said, they're going to make the errors and logs better in the future.
At the moment you would need to contact support. But first check, if you have your dynos configured correctly.
I have deployed the parse server on heroku (https://github.com/ParsePlatform/parse-server) but can't find anything to deploy the parse dashboard on heroku. Any reference is appreciated!!
You shouldn't have to clone the parse-dashboard repository. Here is a better way using parse-dashboard as a node module.
Create a new node app:
mkdir my-parse-dashboard
cd my-parse-dashboard
npm init
Fill out the details it asks for.
Create a git repository:
git init
Additionally you can push this git repository to a remote server (e.g. Bitbucket). Note this repository should be private since it will contain your master key.
Install the parse-dashboard package:
npm install parse-dashboard --save
Create an index.js file with the following line:
require('parse-dashboard/Parse-Dashboard/index.js');
Create a parse-dashboard-config.json file which looks like this:
{
"apps": [
{
"serverURL": "your parse server url",
"appId": "your app Id",
"masterKey": "your master key",
"appName": "My Parse App"
}
],
"users": [
{
"user":"username",
"pass":"password"
}
]
}
Update your package.json file and add this section (or modify it if it already exists):
"scripts": {
"start": "node ./index.js --config ./parse-dashboard-config.json --allowInsecureHTTP=1"
}
Note: The allowInsecureHTTP flag seems to be required on Heroku. Thanks to #nsarafa for this.
Commit all your changes and merge them into master.
Create a new Heroku app: heroku apps:create my-parse-dashboard
Run git push heroku master to deploy your app to Heroku.
Remember to generate a strong password as your dashboard is accessible to anyone on the internet. And make the dashboard only accessible through SSL else your password will be sent in clear text. Read this tutorial on how to force all traffic over SSL on Heroku with Cloudflare for your domain.
I just managed to get this working. Here are the steps I took.
Clone parse-dashboard to your local machine.
Run npm install inside that directory.
Update package.json and change the "start" script to:
"start": "node ./Parse-Dashboard/index.js --config ./Parse-Dashboard /parse-dashboard-config.json --allowInsecureHTTP=1"
(Thanks to nsarafa's answer above for that).
Edit your .gitignore file and remove the following three lines:
bundles/Parse-Dashboard/public/bundles/Parse-Dashboard/parsedashboard-config.json
Edit your config file in Parse-Dashboard/parse-dashboard-config.json, making sure URLs and keys are correct. Here is an example :
{
"apps": [
{
"serverURL": "https://dhowung-fjird-52012.herokuapp.com/parse",
"appId": "myAppId",
"masterKey": "myMasterKey",
"appName": "dhowung-fjird-40722"
}
],
"users": [
{
"user":"myUserName",
"pass":"Str0ng_?Passw0rd"
}
]
}
Remove the cache from your heroku parse server app :
heroku config:set NODE_MODULES_CACHE=false --app yourHerokuParseServerApp
if we follow the example above
yourHerokuParseServerApp = dhowung-fjird-40722
(Again, thanks to nsarafa).
Add, commit and push your changes.
Deploy to Heroku again using their CLI or the dashboard.
Step 4 was the key for me because I wasn't committing my config file, and it took me a while to realise.
Also, as stated above, make sure you have user logins and passwords in your config file, following the parse-dashboard docs:
PS: on your heroku parse server make sure your SERVER_URL looks like this https://yourHerokuParseServerAppName.herokuapp.com/parse
Update brew brew update
Install heroku-cli brew install heroku-toolbelt
Login via command line with your heroku credentials heroku login
Make sure your app is there heroku list and note YOURHEROKUAPPSNAME containing the parse-dashboard deployment
Tell Heroku to ignore the cache from previous deploys heroku config:set NODE_MODULES_CACHE=false --app YOURHEROKUAPPSNAME
Go to your package.json and change start: node ./Parse-Dashboard/index.js to start node./Parse-Dashboard/index.js --config ./Parse-Dashboard/parse-dashboard-config.json --allowInsecureHTTP=1"
Delete your Procfile rm Procfile
Add, commit and merge to your master branch
Run git push heroku master
The start script inside your package.json overrides whatever you declare inside of the Procfile. This process should enable a clean deploy to Heroku. Please be cautious and generate user logins with strong passwords before performing this deployment per the parse-dashboard documentation.
This might be a general question, but I have a simple "gym log" app, written in node and I am using Couchbase as the database. Everything works when I run it on my machine. The problem arises when after I've deployed it to Heroku and try to run it. When I check the logs I get the error that module couchbase could not be found.
Do I have to add an add-on to heroku or define couchbase as a dependency in my package.json for my app to work on heroku?
Could someone give me some pointers please?
Here is the link to all my code:
github/MMRibot/loGym
The error "module couchbase could not be found" means your Node app can't find the couchbase module. You most likely installed it locally with "npm install couchbase", so it works on your machine. To have it working on Heroku, you have to add the couchbase module dependency to your package.json file.
"dependencies": {
"hapi": "^6.0.2",
"joi": "^4.6.1",
"request": "^2.37.0",
"underscore": "^1.6.0",
"couchbase": "*"
}
Replace "*" with a specific version if you don't want to use the latest (2.0.3 as of this writing.)