`firebase deploy`只是挂起(`firebase deploy` just hangs)

编程入门 行业动态 更新时间:2024-10-26 22:29:59
`firebase deploy`只是挂起(`firebase deploy` just hangs)

我正在尝试将网站部署到Firebase。

firebase init工作正常。 然后我运行firebase bootstrap并选择了tetris模板。 到现在为止还挺好。 但是当我运行firebase deploy我Preparing to deploy Public Directory...然后它只是永远挂起。

我怎样才能找出发生了什么问题?

随机信息的情况下,它有助于:我的firebase-tools是版本1.0.1; node版本是0.8.20; npm是版本1.4.23。 我运行sudo npm install -g firebase-tools来获取CLI。 我在Android 4.4.3设备上运行debian chroot。 我的wifi工作正常。 在百灵之中,我甚至尝试过运行sudo firebase deploy ,以防取决于ICMP数据包或其他东西,但没有任何区别。

I'm trying to deploy a site to firebase.

firebase init worked fine. I then ran firebase bootstrap and chose the tetris template. So far so good. But when I run firebase deploy I get Preparing to deploy Public Directory... and then it just hangs forever.

How can I figure out what's going wrong?

Random info in case it helps: My firebase-tools is version 1.0.1; node is version 0.8.20; npm is version 1.4.23. I ran sudo npm install -g firebase-tools to get the CLI. I'm running on a debian chroot on Android 4.4.3 device. My wifi works fine. On a lark I even tried running sudo firebase deploy in case it depends on ICMP packets or something, but there was no difference.

最满意答案

首先,它不起作用的主要原因是需要Node.js 0.10或更高版本 。

但是,即使您升级了Node(并且我建议您也获取最新的firebase-tools ),您可能会尝试部署运行初始firebase init命令的目录,或者至少部署该文件夹您在设置中指定(默认为您运行命令的文件夹)。

您应该更改目录并从由bootstrap命令创建的文件夹中运行firebase deploy命令 - 该命令将以其创建的Firebase名称命名,并且您可以删除在父项目中创建的firebase.json文件目录。

原因是firebase init和firebase bootstrap是做同样事情的两种不同方式 - 让文件夹处于可部署状态。 firebase init是针对现有项目以及最终将部署的文件,并且firebase bootstrap是用于从现有模板之一创建项目。 通过同时运行,初始firebase init会创建一个firebase.json文件,其中包含由提示指定的设置,然后firebase bootstrap命令将创建一个全新的子文件夹,其中包含针对不同设置的firebase.json。

Firstly, the main reason it's not working is that Node.js version 0.10 or greater is required.

However, even once you've upgraded Node (and I'd recommend getting the latest of firebase-tools too) you're likely to be attempting to deploy the directory that you ran the initial firebase init command from, or at least the folder you specified in the setup (which defaults to the folder you ran the command from).

You should change directory and run the firebase deploy command from the folder that was created by the bootstrap command - which would have been named after the name of the Firebase it was created with, and you can delete the firebase.json file created in the parent directory.

The reason is that firebase init and firebase bootstrap are two different ways of doing the same thing - getting a folder in a deployable state. firebase init is for existing projects with files that will eventually be deployed, and firebase bootstrap is for creating a project from one of the existing templates. By running both, the initial firebase init would have created a firebase.json file containing the settings specified by the prompts, and then the firebase bootstrap command would have created a whole new sub-folder with its own firebase.json for the different settings.

更多推荐

本文发布于:2023-07-25 10:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1260061.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:挂起   firebase   deploy   hangs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!