Firebase主机设置问题 [英] Firebase Hosting set up issue
问题描述
'firebase'不被识别为内部或外部命令,可操作的程序或批处理文件。
我所做的:
- $
-
- 通过控制面板设置PATH = C:\ Program Files \\\
odejs;
- 在cmd中:
cd C:\ Program Files \\\
odejs -
npm install -g firebase-tools < code
- 尝试运行
firebase app init $>将目录更改为使用我的html文件的文件夹c $ c>和
firebase init
这两者都不起作用,并给我同样的错误
我有这个完全相同的错误。我修改了路径变量以包含firebase。
尝试在Windows上通过C:\ Users \ myname\AppData\Roaming\\找到firebase.cmd \
pm。我找不到firebase.exe,这是我困惑的地方。看看你的截图,我可以看到路径保存的位置。
只要搜索firebase.cmd并将其添加到您的%PATH% C:\Users\myname\AppData\Roaming\\\
。然后重新启动,然后再试一次:firebase应该是一个有效的命令
pm
对不起,这是一年后,希望这可以帮助别人。
I'm just trying to do a simple set-up for hosting on firebase. I'm following the instructions at (https://www.firebase.com/docs/hosting/guide/deploying.html) but I'm missing something because I keep getting an error of:
'firebase' is not recognized as an internal or external command, operable program, or batch file."
What I've done:
- Installed nodejs.
- Set PATH = to C:\Program Files\nodejs; via control Panel
- in cmd:
cd C:\Program Files\nodejs
npm install -g firebase-tools
- changed directory to folder with my html files
- tried running both
firebase app init
andfirebase init
neither of which work and give me the same error
I had this exact same error. I fixed it by changing the path variable to include firebase.
Try finding firebase.cmd on Windows through C:\Users\myname\AppData\Roaming\npm. I couldn't find firebase.exe, which is where I got confused. Looking at your screenshot, I can see where the path is saved.
Just search for the firebase.cmd and add it to your %PATH% C:\Users\myname\AppData\Roaming\npm
. Then restart and try again: firebase should be a valid command
Sorry this is a year late and hope this helps someone.
这篇关于Firebase主机设置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!