标签: firebase-tools

如何结束服务或firebase服务

我一直在使用Angular2进行Web开发,并且一直使用Angular2和Firebase来运行本地服务器.在使用Ionic创建服务器时,我无法找到类似于键入quit的命令,因此我每次都必须关闭终端选项卡.有没有办法结束服务器并让我的终端选项卡回来?

谢谢.

firebase firebase-tools angular-cli angular

106
推荐指数
7
解决办法
14万
查看次数

错误“术语‘flutterfire’未被识别为 cmdlet、函数、脚本文件或可操作程序的名称”

我正在尝试在我的根项目中安装 flutterfire_cli,所以我输入了以下命令:

FirebaseFirestore firestore = FirebaseFirestore.instance;
Run Code Online (Sandbox Code Playgroud)

之后,这是控制台会话(PowerShell):

FirebaseFirestore firestore = FirebaseFirestore.instance;
Run Code Online (Sandbox Code Playgroud)

输出:

cd C:\Users\PC\Desktop\eventually
dart pub global activate flutterfire_cli
Run Code Online (Sandbox Code Playgroud)

为了修复该警告,我将C:\Users\PC\AppData\Local\Pub\Cache\bin添加到系统变量环境中的Path环境变量中。(但这不起作用,我仍然收到警告)

接下来,我尝试使用以下命令生成firebase_options.dart文件,如文档所述:

Package flutterfire_cli is currently active at version 0.1.1+2.
Resolving dependencies...
The package flutterfire_cli is already activated at newest available version.
To recompile executables, first run `global deactivate flutterfire_cli`.
Installed executable flutterfire.
Warning: Pub installs executables into C:\Users\PC\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory …
Run Code Online (Sandbox Code Playgroud)

firebase firebase-tools flutter

91
推荐指数
8
解决办法
17万
查看次数

如何从firebase cli切换应用程序?

这似乎很容易做到,但无论出于何种原因,我都被打败了.

我正在尝试使用firebase-tools CLI与我的数据库进行交互.我能够毫无困难地登录,当我输入时firebase list,我会得到所有当前应用程序的列表.它还告诉我我当前连接的应用程序.

我的问题是,我想连接到其他应用程序之一.我在我的暂存应用程序上运行查询,我需要在我的生产应用程序上运行它们.我可以在列表中看到生产应用程序,但我找不到任何方法切换到该应用程序.

思考?

firebase firebase-tools

63
推荐指数
6
解决办法
2万
查看次数

如何在不影响其他功能的情况下将一些功能部署到Cloud Functions for Firebase?

我跑的时候

firebase deploy --only functions

它读取index.js文件并更新从该文件导出的所有函数.如果在之前的部署中有一个名为的函数a,并且在当前部署中没有这样的函数,a将被删除.

换句话说,效果与删除所有现有函数,然后index.js添加当前文件中的所有函数相同.

是否可以添加/更新/删除单个功能?

firebase firebase-tools google-cloud-functions

60
推荐指数
6
解决办法
2万
查看次数

错误的ERR!asyncWrite不是一个函数

npm install -g firebase-tools npm ERR!asyncWrite不是函数npm ERR!pna.nextTick不是一个函数

错误的ERR!可以在以下位置找到此运行的完整日志:npm ERR!/home/developer/.npm/_logs/2018-05-30T05_42_20_569Z-debug.log

.log数据

/home/developer/.npm/_logs/2018-05-30T05_42_20_569Z-debug.log0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'firebase-tools' ]
2 info using npm@6.1.0
3 info using node@v10.3.0
4 verbose npm-session 4ca1ad6ed9bde18f
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 verbose stack TypeError: asyncWrite is not a function
7 verbose stack     at onwrite (/usr/local/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_writable.js:480:7)
7 verbose stack     at …
Run Code Online (Sandbox Code Playgroud)

node.js npm firebase-tools

42
推荐指数
8
解决办法
3万
查看次数

firebase deploy --only函数覆盖现有函数

运行firebase deploy --only functions在创建新函数之前删除现有函数.是否可以将此行为修改为create if not exist, update if exists, no actions if functions not being deployed

function firebase firebase-tools google-cloud-functions

40
推荐指数
2
解决办法
2万
查看次数

Firebase CLI:"配置为单页应用程序(将所有URL重写为/index.html)"

我刚刚使用Firebase CLI来初始化静态托管项目.启用"配置为单页应用程序"选项时会发生什么?我正在寻找一个关于哪些文件被修改的描述,以及它对Firebase后端的影响.

firebase init命令的屏幕截图

firebase firebase-hosting firebase-tools

35
推荐指数
4
解决办法
2万
查看次数

如何将cloud firestore中的数据导入本地模拟器?

我希望能够在本地运行云函数并针对生产数据的副本进行调试。有没有办法将在线的数据复制到本地firestore模拟器?

firebase-tools google-cloud-functions google-cloud-firestore

34
推荐指数
6
解决办法
2万
查看次数

如何使用命令行部署Firebase数据库安全规则?

在较旧版本的Firebase中,我们可以在文件中添加一个rules部分firebase.json,并在每次部署时上传新的安全规则.

我们如何使用firebase-toolsv3命令行工具部署数据库安全规则?

此页面表明可能:"Firebase存储规则"

此页面提示命令行工具可以执行此操作,但似乎firebase --helpfirebase deploy --help没有暗示如何执行此操作?(道歉,如果我错过了......)

(相关:可以进入的所有内容的规范文档在哪里firebase.json?我在旧的Firebase网站上找到它,但无法通过搜索新文档找到它.)

谢谢!

firebase firebase-security firebase-tools firebase-realtime-database

32
推荐指数
4
解决办法
9718
查看次数

如何设置 Firebase 演示项目

Firebase文档提到本地模拟器支持 Real 和 Demo 项目。演示项目定义为:

演示项目没有 Firebase 控制台配置,也没有实时资源。演示项目 ID 具有 demo- 前缀。

上面提到了 demo- 前缀,但我找不到任何说明其工作原理的示例。是否可以设置上述文档中指定的演示项目,而不需要 Firebase 控制台项目或任何实时资源?

firebase firebase-tools

29
推荐指数
1
解决办法
2524
查看次数