Comments (48)
@tejasrsuthar
navigate to the firebase directory and call it out on the cmd. so
1.run cmd as admin
2. cd C:\users\yourusername\AppData\Roaming\npm
3. firebase.cmd login
or firebase login
there you go. above steps are all commands goes to your command prompt.
from firebase-tools.
SOLUTION
For those still having trouble, seems to be for me that where npm installs its packages has been lost as an environment variable.
If the package has been installed globally, it's normally in C:\Users\"yourname"\AppData\Roaming\npm
If you add that to your %PATH%, open a new cmd window, and you should be good to go.
from firebase-tools.
@vuabid has mentioned the way to fix the long path problem, but I will make it detail instruction for others:
(I'm using win 10)
- Open File Explorer (or simply press WindowButton + E).
- Right click on "This PC" => properties
- Look for "Advanced system settings" on the left side => click on that and it will open a popup
- Choose "Advanced" tab => Click on button "Environment Variables ..."
- In the "System variables" segment, look for variable "Path" => choose and click on "Edit" button
- Click "New" button and paste in the new line with this link:
"C:\Users{yourUsername}\AppData\Roaming\npm"
(Check the link in your PC for concise path)
=> Press Enter => OK => OK => OK - Now you can open a new cmd, type in "firebase --version" and you will see the version of your firebase
from firebase-tools.
Yeah, definitely. I'm glad you ask. From my perspective, Firebase is a great tool for those who are not shy to pick up programming, but who are not necessarily knowledgeable of all the ins-and-outs. I've basically described myself, someone who wants a robust and easy to use tool that they can use without having to learn back-end programming in-depth. I feel like that aligns with Firebase's vision. That being said...
I like the clear and concise format of the guides, but there are cases where things are too simplified, and they don't actually work out for the user as simply as shown in the guide. Take for example, the hosting/deploy guide on firebase (https://www.firebase.com/docs/hosting/guide/deploying.html). It quickly tells you to install node.js and then run '$ npm install -g firebase-tools', and then '$ firebase init'. In theory, this processes should have been very easy for me, but instead it took a lot of times, weeks, to figure out what was going on behind the scenes with node.js and it's npm installer. It would be helpful if you could reference some guides for node.js and npm installer so that readers who are not familiar with the software and look it up. Basically, what I'm trying to say is, for the newbie who is picking up web dev for the first time, giving them a bigger picture of what the dependencies are (other software requirements) and some of the issues that they might occur along the way, would be helpful.
Also, it would be great if there was an option to export your documentation as a PDF or even a basic text file. As I recall, documentation for Firebase documentation is only accessable via the web.
from firebase-tools.
This worked for me:
- Open cmd and cd C:\Program Files\nodejs
- npm install -g firebase-tools
- Restart your computer
- Open cmd and check firebase --version.
from firebase-tools.
And within 8 minutes of posting I did it! Albeit ... not as I expected.
To use firebase at the moment, I must list the FULL directory path with each command. Meaning "firebase init" is now "C:\Users\name\AppData\Roaming\npm\firebase.cmd init"
Now I just realised, that's what you said @flyingsriracha 💃
from firebase-tools.
in cmd to check if it is installed and its version:
npm firebase -version
from firebase-tools.
like the above, I was only able to run it by typing the full path, ie; C:\Users\name\AppData\Roaming\npm\firebase init
Why is it like this when it is supposed to be easier by simply typing firebase init from within the project folder? And how can we fix things so that it is like this? Is that possible? Running Windows 7.
from firebase-tools.
None of this works. What do you have to do to get this running? What a joke.
from firebase-tools.
Add this path to Windows 10 Advance Settings "Environment Variables" PATH and then restart your system.
%USERPROFILE%\AppData\Roaming\npm\firebase;
from firebase-tools.
Try to reinstall NodeJS that fixed this problem for me
from firebase-tools.
@alexsandracodes Apologies for the delayed reply. What can you tell us about the platform that you're running on (Win, OSX, Linux w/ version) in addition to the environment (Node and NPM versions)?
from firebase-tools.
@alexsandracodes From the StackOverflow, it looks like you're on Windows. If you've solved this, could you let us know how you resolved it? If not, could you reach out to me at [email protected]?
from firebase-tools.
Hey Robert! Thanks a lot for the response. Sorry I didn't notice it before. It wasn't actually an issue with firebase, it was an npm install issue. I got it figured out now. :)
from firebase-tools.
@alexsandracodes Ok, great! I'll close this issue out. Out of curiosity, is there anything that might be useful for us to document, in case others run into the issue?
from firebase-tools.
@alexsandracodes Thanks for the feedback! That's really helpful, and I'll pass this along to the rest of the team.
from firebase-tools.
so how did you fix it @alexsandracodes ????? same prob ty.
from firebase-tools.
kindly tell me how did you resolve this problem i have install npm tool but i could not understand what is npm issue
from firebase-tools.
Today I also got the same issue. @alexsandracodes would you please kindly let us know what steps did you follow in order to fix that issue? Thanks.
from firebase-tools.
same for me
http://stackoverflow.com/questions/38912491/bash-firebase-command-not-found
from firebase-tools.
Thank you so much @flyingsriracha it worked.
from firebase-tools.
Ahh this causes me so much pain! I had it working the very first time I installed firebase and ran login, deploy, etc.
After closing the PowerShell window I was using, I haven't been able to access firebase commands in any CLI (cmd, Git Bash, PowerShell or all as administrator). I have done the steps outlined by @flyingsriracha however it only gets me to 'login'. I can't do any other firebase commands in any other directory.
Please help! I've also installed latest firebase tools several times in each CLI with no luck (they install, I restarted and I still cannot access firebase commands). I am on Win 10.
Thanks!
from firebase-tools.
Cheers @flyingsriracha those were exactly the steps I needed
from firebase-tools.
Building off of what @danielcrowley said, make sure you EDIT your Path variable. Put a comma at the end and then paste the path, otherwise, you'll do what I just did and delete whatever else was in your path and overwrite it with your new npm path.
Whoops :(
from firebase-tools.
@danielcrowley it still not working for me
from firebase-tools.
Thank you so much @flyingsriracha it worked.
from firebase-tools.
@vedhaperi thank you so much ..
from firebase-tools.
bless you! @PercyPham
from firebase-tools.
This alone worked for me on Windows 10 system
npm install -g firebase-tools
Before trying this I used :
npm i g firebase-tools (just g instead of -g) and it was not working
from firebase-tools.
On Windows 10, Press Win+I to open the system settings dialog. In the search box type "environment" Choose "Edit Environment variables for your account"
Then add %USERPROFILE%\AppData\AppData\Roaming\npm to your Path environment variable.
from firebase-tools.
I think the main issue most people have is that when you navigate to C:\Users\USERNAME\appdata\Roaming\npm
"firebase" file and "firebase.cmd" file tend to be missing. I believe a re-install and reboot should fix it
from firebase-tools.
add env variable in path can fix it. and restart cmd. if you use some terminal emulator like fluent terminal, it may not recognize, just have a try at another one, like hyper terminal, or cmd, powershell
from firebase-tools.
@danielcrowley Thanks. Adding a globally installed package to the path of env variables helps.
from firebase-tools.
C:\users\yourusername\AppData\Roaming\npm
Alternatively, you can add this to your PATH using environment variables in windows.
from firebase-tools.
Add this path to Windows 10 Advance Settings "Environment Variables" PATH and then restart your system.
%USERPROFILE%\AppData\Roaming\npm\firebase;
Thank you very much. That worked for me.
from firebase-tools.
This worked for me "npm install -g firebase-tools"
from firebase-tools.
Some time when you install node it will update %PATH% for user environment variable but you have to add "C:\Users\username\AppData\Roaming\npm" path in %PATH% of system environment variable and then after restart you terminal or cmd and try "firebase init".
from firebase-tools.
I've tried changing the path variable, running from the npm directory, restarting, and everything else listed here. Still no luck.
It worked fine on another PC though.
from firebase-tools.
The "firebase login" command is not working for me.What do i do?
from firebase-tools.
likewise me, tried all the options stated here all to no avail
from firebase-tools.
I tried all the methods but I am still getting the same error.
firebase: command not found
Please help?
from firebase-tools.
For people who try all the methods and still getting the same error, the following steps works for me:
- run npm install -g firebase-tools
- In *C:* you will see a folder name usr. In the usr folder, copy the local folder and paste it in the C:\Users{PCName}\AppData\Roaming\npm.
- Rename the local with firebase.
- Enter in environment variables -> Path ->Edit -> New -> C:\Users{PCName}\AppData\Roaming\npm\firebase -> OK -> OK -> OK
And restart the PC
After restart, for testing if it work, enter in cmd and write firebase --version
from firebase-tools.
@tejasrsuthar
navigate to the firebase directory and call it out on the cmd. so
1.run cmd as admin
2. cd C:\users\yourusername\AppData\Roaming\npm
3. firebase.cmd login
or firebase login
there you go. above steps are all commands goes to your command prompt.
It is also not working!
from firebase-tools.
Thankyou @flyingsriracha that worked for me
from firebase-tools.
I have this problem, tried all the above steps, have the correct environment variables and no luck.
I see that firebase is contained within /users/appdata/roaming/npm/node_modules/firebase
How far down the directory tree should the Path variable be set? only to /npm ?
from firebase-tools.
I'm able to run the global install of firebase-tools:
$npm install -g firebase-tools
but then I try to run:
$ firebase init
and I get the error:'firebase' is not recognized as an internal or external command, operable program, or batch file.
I would really appreciate anyone's help! I've also posted this on stackoverflow:
http://stackoverflow.com/q/29531235/4342441?stw=2
This is the answer!!
Set-ExecutionPolicy RemoteSigned
from firebase-tools.
I have this problem, tried all the above steps, have the correct environment variables and no luck.
I see that firebase is contained within /users/appdata/roaming/npm/node_modules/firebase
How far down the directory tree should the Path variable be set? only to /npm ?
Hii!
Just Run this command in your working directory.
Set-ExecutionPolicy RemoteSigned
from firebase-tools.
There are now an abundance of troubleshooting steps and solutions offered here. Locking this issue as further "me too" discussions aren't going to be findable or resolvable at this point. If you try the following steps and still have problems, file a separate issue with a minimal, complete, verifiable repro of the problem (logs, screenshots, steps, version info, os info, et al) that can be used for troubleshooting.
Ways to install the CLI (doc):
auto install script: curl -sL https://firebase.tools | bash
standalone binary: download here
npm version: npm install -g firebase-tools
Where the CLI executable is usually stored
Mac: /users/appdata/roaming/npm/node_modules/firebase
Windows: C:\users\yourusername\AppData\Roaming\npm
or %USERPROFILE%\AppData\AppData\Roaming\npm
Potential solutions if your OS can't find the command
-
If running
env
(mac) orecho %PATH%
(windows) doesn't show the path to your CLI executable add it to yourPATH
environment variable (on windows: WIN+L to open settings, search for environment). -
Try running
Set-ExecutionPolicy RemoteSigned
so post -
Run it manually (just a temporary workaround, should not be necessary)
- run
cmd
as admin - cd
C:\users\yourusername\AppData\Roaming\npm
firebase.cmd login
orfirebase login
- run
After all solutions, you need to close the terminal / command prompt and restart it! Some users had to restart their computers before the changes took effect, but it's unclear if that's actually necessary.
from firebase-tools.
Related Issues (20)
- firebase serve Error: TIMEOUT: Port 5001 on localhost was not active within 5000ms HOT 7
- Emulator Functions do not watch source code path that has node_module in its path HOT 2
- Not able to deploy my project HOT 2
- protobufjs Prototype Pollution vulnerability HOT 2
- Update to ESLint 9 Flat Config
- Next.js SSR: "Couldn't find any 'pages' or 'app' directory. Please create one under the project root" HOT 2
- Unable to deploy cloud functions HOT 1
- Cannot deploy Next.js app with Server Side Rendering HOT 10
- firebase deploy not working HOT 2
- If the functions code takes a long time to load, an error will occur and loading will be interrupted HOT 3
- Fail to install Firebase CLI on macOS HOT 1
- IterableIterator can only be iterated with '--downlevelIteration' flag or with 'es2015' or higher. HOT 3
- firebase serve: TypeError: Cannot read properties of undefined (reading 'getTime') HOT 6
- Error: Failed to get Firebase project 123456789 after reinstalling Firebase CLI HOT 2
- firebase deploy: no such file or directory HOT 2
- Error: ENOENT: no such file or directory HOT 1
- firebase benkio HOT 1
- app distribution error HOT 10
- Running firebase deploy with service account and missing permission errors with "Assertion failed" HOT 1
- upon a opening a new tab the web app is using a different mail account which causing a authentication failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-tools.