简体   繁体   English

Firebase 部署找不到 firebase.json

[英]Firebase deploy could not locate firebase.json

so, im a newbie in programming and still learning some stuff (i use windows btw)所以,我是编程新手,仍在学习一些东西(顺便说一句,我使用 windows)

i try to make an app, connect it to firebase. after setting up everything its time to setting the CLI我尝试制作一个应用程序,将其连接到 firebase。在设置好所有内容之后,是时候设置 CLI 了

good news : i successfully setting up everything from node to nvm untill sucessfully launch the login in CLI.好消息:我成功地设置了从节点到 nvm 的所有内容,直到在 CLI 中成功启动登录。

bad news : right after successfully logn the CLI, im trying to type in the cmd坏消息:成功登录 CLI 后,我正在尝试输入 cmd

firebase deploy --only function firebase 部署——仅 function

and this error appear并出现此错误

Error: not in a Firebase app directory (could not locate firebase.json)错误:不在 Firebase 应用程序目录中(找不到 firebase.json)

i already search the web for the solution but i found nothing我已经在 web 中搜索了解决方案,但我一无所获

can someone tell me did i miss something?有人可以告诉我我错过了什么吗? thanks.谢谢。

After logging into firebase with "firebase login" you will need to do: "firebase init" and then select the correct options when prompted. 使用“firebase login”登录firebase后,您需要执行:“firebase init”,然后在出现提示时选择正确的选项。 be sure to press the space bar to check the functions circle in the command line. 请务必按空格键以检查命令行中的功能圆。

firebase init didn't work for me, but firebase init hosting did. firebase init对我不起作用,但firebase init hosting对我有用。 You can read the firebase hosting initialization docs here .您可以在 此处阅读 firebase 托管初始化文档。

firebase init

or或者

firebase init hosting

And then popup question: Set up automatic builds and deploys with GitHub?然后弹出问题:Set up automatic builds and deploys with GitHub? No在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM