Heroku logs stop working - heroku

I need help.
I'm using Heroku as my server Node JS. Until several time when I'm using heroku logs the console are showing the logs. then suddenly when I restart my computer and I use heroku logs I'm getting logs error which are
TypeError: Cannot read property 'run' of undefined
at Object.<anonymous> (C:\...\heroku\tmp\heroku-script-884953635:14:4)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:159:18)
at node.js:444:3
Is there something I've missing here? also, I've checked heroku addons and the result is No add-ons for app myproject.
thanks

The "heroku logs" worked for me three months ago, and I am on window 10.
The logs stopped working for me too.
And, I uninstall the heroku-toolbelt on my window, and re-install it again.
The "heroku logs" works for me again.

Related

Run Heroku Bash Command 7/24

I have to open the Heroku bash and type "node main.js" to run my app. But when I close my browser the script stops. How can I run the script 24/7?
You seem to be new to heroku, this should help
In your package.json file mention a start script:
"scripts": {
"start": "node main.js",
...
}
(If you don't have a package.json make sure to run npm init -y and commit this file)
And to scale(run) your app:
heroku ps:scale web=1
Your heroku app should automatically be detected as a node application and it would run the start script upon starting
To see the logs and debug, do:
heroku logs --tail --num=10
and then try visiting your app with the terminal open to see live logs
If you have further problems, make sure to include your logs without any credentials possibly leaked

Heroku missing required flag when restoring database

I've seen a couple of SO posts, and despite googleing and the heroku --help, I keep getting the same error
I've been working off of this:
https://devcenter.heroku.com/articles/heroku-postgres-import-export
$ heroku pg:backups:restore 'secure-file-location-url' DATABASE_URL --app heroku-app-name --confirm heroku-app-name
Starting restore of secure-file-location-url to postgresql-flat-47715... done
Use Ctrl-C at any time to stop monitoring progress; the backup will continue restoring.
Use heroku pg:backups to check progress.
Stop a running restore with heroku pg:backups:cancel.
Restoring... !
▸ An error occurred and the backup did not finish.
▸
▸ waiting for restore to complete
▸ pg_restore finished with errors
▸ waiting for download to complete
▸ download finished with errors
▸ please check the source URL and ensure it is publicly accessible
▸
▸ Run heroku pg:backups:info r018 for more details.
$ heroku pg:backups:info r018
› Error: Missing required flag:
› -a, --app APP app to run command against
› See more help with --help
My secure-file-location-url is a public Google Drive link, which I can access in an incognito browser window.
As discussed in the comments, your database dump is being hosted on Google Drive and the link you're providing goes to a viewer with a "download file" button.
Instead, you must provide a direct link to the file. The documentation recommends using Amazon S3.
I ran into this problem as well, how I solved it was by adding run to the Heroku CLI command. Formatted like so:
heroku pg:backups:restore '<signed url>' DATABASE_URL -a <your-application-name>
Literally, put DATABASE_URL in there and it will read it from your environment variables. If you try putting in the postgress address it will fail. Also, the application needs to be the last thing added to this command, order matters here.

application error when trying to Deploy static website with bootstrap template to heroku

I'm trying to deploy a single page html/css/js site that was built using a bootstrap template to Heroku and continue to get an application error. I've tried some of the hacks I've found online but continue to fail with
npm ERR! missing script: start
as well as, here is the most recent log. Can anyone help?
You need to add in the root of your files, file with name Procfile
and there add this line:
web: node [app.js]
or just add to your package.json file in the scripts this line:
"scripts": {
"start": "node [app.js]"
}
where app.js is the server start file.

Heroku: Error 9 when using 'heroku local web' with the Node.js starter project

I'm following the "Getting Started on Heroku with Node.js" tutorial, and I got to the part where I use "heroku local web" to launch my app. When I try, I get this error message:
[OKAY] Loaded ENV .env File as KEY=VALUE Format
08:54:38 web.1
| (node:4716) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please
use node --inspect or node --inspect-brk instead.
08:54:38 web.1
Exited with exit code 9
I had this issue with Heroku after upgrading to Node 8.8.1.
It turned out my Procfile indeed contained the deprecated --debug param:
web: node --debug=5858 index.js
I simply changed this to
web: node --inspect=5858 index.js
And now everything seems to works as expected.
You may be having this issue because like me, you based your project of the Getting Started with Node on Heroku repo, which still uses an older version of Node.
I got the same Error, Seems like the issue is with node version, downgrading Node had fixed the issue.
Follow this link to downgrade Node

Running Dart App on Heroku

I am following this blog to upload a Dart app to Heroku and run it. I have gotten to the point where the app is successfully deployed to Heroku, but the app is not running. The following is from the Heroku logs:
2012-12-20T18:04:57+00:00 heroku[web.1]: Starting process with command `dart TestApp.dart`
2012-12-20T18:04:57+00:00 app[web.1]: bash: dart: command not found
2012-12-20T18:04:58+00:00 heroku[web.1]: Process exited with status 127
2012-12-20T18:04:58+00:00 heroku[web.1]: State changed from starting to crashed
The following is the contents of my Procfile
web: dart TestApp.dart
Can anyone point me towards a solution to this error?
You should have forgotten to add the buildpack to the config. See the getting started of Heroku Buildpack for Dart.
Basically, you have to use the following commands :
$> heroku create myapp_name -s cedar
$> heroku config:add BUILDPACK_URL=https://github.com/igrigorik/heroku-buildpack-dart.git
WARNING : With the last version of buildpack it seems dart command is no more in the PATH. A workaround is to use the full path in Procfile:
web: ./dart-sdk/bin/dart TestApp.dart

Resources