部署时数据库规则中的语法错误
将我的网站部署到 firebase 时,我在数据库规则中收到语法错误,显示:
2:5:预期的规则属性。
我列出了 json 中的代码
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
},
"database": {
"rules": "firebase.json"
},
"emulators": {
"auth": {
"port": 9099
},
"database": {
"port": 9000
},
"hosting": {
"port": 5000
},
"ui": {
"enabled": true
}
}
}
While deploying my website to firebase,i get a syntax error in database rules showing:
2:5: Expected rules property.
I am listing down the code in json
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
},
"database": {
"rules": "firebase.json"
},
"emulators": {
"auth": {
"port": 9099
},
"database": {
"port": 9000
},
"hosting": {
"port": 5000
},
"ui": {
"enabled": true
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
规则值应指向规则文件,而不是
firebase.json
文件本身。类似于:该规则文件必须定义有效的数据库规则。例如:
The rules value should point to a rules file, not at the
firebase.json
file itself. Something like:That rules file must define valid database rules. For example: