【发布时间】:2020-05-28 07:24:06
【问题描述】:
当我运行 firebase 部署时:
Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase deploy
⚠ "firebase" key in firebase.json is deprecated. Run firebase use --add instead
⚠ hosting: We found a hosting key inside firebase.json as well as hosting configuration keys that are not nested inside the hosting key.
Please run firebase tools:migrate to fix this issue.
Please note that this will overwrite any configuration keys nested inside the hosting key with configuration keys at the root level of firebase.json.
Error: Hosting key and legacy hosting keys are both present in firebase.json.
当我运行 firebase 时,按照建议使用 --add:
Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase use --add
⚠ "firebase" key in firebase.json is deprecated. Run firebase use --add instead
? Which project do you want to add? showboost-e366b
? What alias do you want to use for this project? (e.g. staging) showboost
Created alias showboost for showboost-e366b.
Now using alias showboost (showboost-e366b)
当我运行 firebase 工具时:按照建议迁移:
Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase tools:migrate
⚠ "firebase" key in firebase.json is deprecated. Run firebase use --add instead
This command is deprecated and will be removed.
i Checking feature configuration...
i Checking "firebase" key...
Error: Server Error. certificate has expired
最后,看看我的 firebase.json 文件:
{
"firebase": "showboost-e366b",
"public": "showboost",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/public/**",
"destination": "/public.html"
},
{
"source": "**",
"destination": "/index.html"
}
],
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
我已经尝试解决这个问题一段时间了,所以任何帮助都会很棒,谢谢!
编辑 - 我一直在研究它,看起来“firebase 工具:迁移”已被弃用。我需要使用新命令吗?
【问题讨论】:
标签: node.js reactjs firebase react-native