Firebase主机设置问题 [英] Firebase Hosting set up issue

查看:324
本文介绍了Firebase主机设置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想做一个简单的设置,以在Firebase上托管。我正在按照( https://www.firebase.com/docs /hosting/guide/deploying.html ),但我错过了一些东西,因为我不断收到错误:

'firebase'不被识别为内部或外部命令,可操作的程序或批处理文件。



我所做的:

    $

  1. 通过控制面板设置PATH = C:\ Program Files \\\
    odejs;
  2. 在cmd中: cd C:\ Program Files \\\
    odejs

  3. npm install -g firebase-tools < code

  4. 尝试运行 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\\\
pm
。然后重新启动,然后再试一次:firebase应该是一个有效的命令



对不起,这是一年后,希望这可以帮助别人。


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:

  1. Installed nodejs.
  2. Set PATH = to C:\Program Files\nodejs; via control Panel
  3. in cmd: cd C:\Program Files\nodejs
  4. npm install -g firebase-tools
  5. changed directory to folder with my html files
  6. tried running both firebase app init and firebase 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆