firebase - 无法删除 Firebase 实时数据库中的值
问题描述
我想从我的实时数据库中删除一个节点(~13mb)。我使用 cli,firebase database:remove '/node'
但我得到了An unexpcted error
. 调试文件说:
[debug] [2020-09-30T10:17:16.845Z] TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at validateString (internal/validators.js:122:11)
at Url.parse (url.js:159:3)
at urlParse (url.js:154:13)
at Url.resolve (url.js:667:29)
at Object.urlResolve [as resolve] (url.js:663:40)
at Object.getDatabaseUrl (/usr/local/lib/node_modules/firebase-tools/lib/utils.js:62:26)
at Command.actionFn (/usr/local/lib/node_modules/firebase-tools/lib/commands/database-remove.js:33:32)
at Command.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/command.js:166:25)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/firebase-tools/lib/command.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
当我这样做firebase database:get '/node'
时,我得到了正确的值。
我已经更新了 firebase-tools 并做了一个新的初始化。
解决方案
我今天遇到了类似的问题,并将其作为问题提交到 firebase-tools GitHub 上:
https://github.com/firebase/firebase-tools/issues/2667
我手动向数据库添加了一个微不足道的密钥,并firebase database:remove
在尝试删除它时遇到了同样的问题。
希望那里的其他人可以重现并解决它。
(如果我有代表,我会对此发表评论......但也许看到问题在那里得到解决才是真正的答案)
编辑:通过数据库的变更日志解决:删除命令修复 #2658合并到主版本中并在 8.12.0 版中发布-效果很好
推荐阅读
- angular - Ionic 4 和 Angular 8 中的动画启动画面
- java - 如何在 Swing 的文本区域中设置语言?
- angular - 如何以角度使用 ArcGis ESRI 地图
- php - 错误在哪里?我想添加用户评论,它给了我错误
- authentication - Keycloak Action Tokens:当用户请求多个操作时如何使用户先前的操作无效(例如重置密码)
- node.js - 尝试在 POST 请求中使用 Google Speech Cloud 时出现 ReadFileSync 错误
- r - 使用管道中的 ifelse 条件修改某些值
- graph - AQL 和图遍历:产品推荐示例
- python-3.x - 我有一个查询,在执行以下代码时,我收到类型错误“Int object is not iterable”
- javascript - 如何使用 fetch 从 Flask 获取 POST 数据