heroku login command doesn't exist - javascript

I was trying to create an app with Heroku. Following the docs, I ran heroku login, and heroku returned the following error:
! Invalid credentials provided.
» Warning: login is not a heroku command.
Did you mean join? [y/n]:
» Error: Run heroku help for a list of available commands.
! Command failed: heroku login
My Heroku Version is heroku-cli/7.0.9 win32-x64 node-v14.11.0. Any idea why this is happening, and how I can fix it?

My solution was to instead install it from npm, and then run heroku login which works.

Related

zsh: command not found: sls

I am running a node js application with AWS.
This is server less application therefore when I am trying to install through this
https://www.serverless.com/plugins/serverless-offline
Things are working fine till here.. after that when I am trying to run sls offline I am getting this error.
zsh: command not found: sls
Can anybody help me what I am missing here. Also I have places all the access details of my AWS creads in AWS credentials.

Discord bot works fine hosted locally but if i try and host it on heroku it says "Error: Cannot find module 'discord.js'"

Discord bot works fine locally on discord server but when hosting on Heroku it says "Error: Cannot find module 'discord.js'"
what can I do to fix this? (first time making a discord bot)
I am not sure what to do to fix this so haven't tried anything other than checking the code
the code should be fine because it works on my discord server when I host it locally
but all the code is posted here (https://github.com/MathiasAC/team-skylo-discord-bot/tree/master/SkyloBotDiscord)
also, I have removed the bot token while I get help it's normally there
I expect it to be hosted on Heroku but it says "Error: Cannot find module 'discord.js'" even though discord.js in the bot folder and it works fine on my discord server locally hosted
You don't have discord.js in your dependencies within package.json.
Run:
npm install discord.js --save
Then push it to Heroku.

Node.JS: Why is my connection to localhost:3000 refused?

I'm a student going into back-end development for the first time and are trying to learn Node.JS. I downloaded a pdf book about Node.JS from sitepoint called: "Jumpstart Node.JS". In following the instructions to set up the server on the command line, install the dependencies, and navigate to localhost:3000, i got nothing except the following message: "Connection refused: localhost:3000", Can somebody please tell me what might have went wrong and how to fix it?
Edit1:
The instructions i followed is about setting up a node.js server using the Node command line, thus no code, simply cmd commands, however, here is a quick summary of the process i followed:
Created an account on MongoLabs and then a database using the free pricing plan.
Installed express using the command: npm install -g express#.2.5.8.
Created an applications with default options using this command: express authentication.
modified the package.json file in system32
installed the dependencies by typing cd authentication, hitting enter, and then typing the command: npm install
Typed node app and hit enter.
According to the instructions i should have seen a message: "Welcome to express" but instead got the error message.
In following the instructions to set up the server on the command line, install the dependencies, and navigate to localhost:3000
It seems that you didn't start the server.
Somewhere between installing the dependencies and navigating to the URL you need to actually start the server if you want it to serve the request.
Check that there is no copy of the server running in the background, or that another app is using the port currently.
(Your firewall show allow you to see which app has been allocated to that port)
Because nodejs requires it to be the only app on that port running on your computer.
Also try a different port maybe?

build error while deploying a html application in heroku

I have uploaded a html application in github but while trying to deploy it in heroku I am getting this error:
No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
Set this buildpack https://github.com/heroku/heroku-buildpack-static
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-static.git

Issue deploying app to Heroku from cloud 9

I have an app on cloud 9 IDE, it works perfectly on cloud 9 when I run nodemon server.js but when I deploy it to Heroku it gives an application error.
How I am deploying it to git:
Login into Heroku and create an app online
Then in cloud 9 terminal I type heroku login and then type in my details
Then I type git init
Then heroku git:remote -a agile-stream-37163
Then git add .
Then git commit -am "initial commit"
Then git push heroku master
It deploys successfully but when I actually go to the app url it comes up with application error. I think I am deploying it wrong, I don't have much experience with git.
Heres an image from my cloud 9 terminal:
Can anyone please tell me how I can fix this.

Categories

Resources