根据 Google/Firebase.io 对 Divshot.io 的收购,我需要在 2015 年 12 月 22 日之前迁移我的生产“静态”HTML 应用程序。我已经安装了最新的firebase-tools
CLI 并更新到了最新的divshot
CLI 并准备了我的环境。
我已遵循divshot的所有指导,但在尝试执行以下操作时收到以下错误deploy
:
Jeffs-rMBP:insider-web jeff [develop] $ cp -p divshot.production.json divshot.json
Jeffs-rMBP:insider-web jeff [develop] $ divshot migrate
Migrating Divshot app insider-web to Firebase Hosting
What is your Firebase project's name? (insider-web) insider
Can we anonymously report which features your app used (for Firebase Hosting roadmap planning, etc.)? (y/n) y
Write firebase.json? (y/n) y
⚠ Warning: The following incompatible features were detected.
- clean_urls support is planned for Firebase Hosting, but is not yet available
- Firebase Hosting does not support AJAX proxying
Don't panic! Some features may be coming soon or there may be workarounds.
Contact support@firebase.com with any questions.
You need to take the following actions to fully migrate your app:
- Rename error.html to 404.html
Wrote firebase.json configuration file.
If you have the latest version of firebase-tools you should now be able
to run firebase serve in this directory to start a local server and
firebase deploy to deploy to Firebase Hosting.
See http://docs.divshot.com/migrate for additional migration info.
Jeffs-rMBP:insider-web jeff [develop] $
我遵循了每次重命名的error.html
指导404.html
:
Jeffs-rMBP:insider-web jeff [develop] $ cp -p error.html 404.html
Jeffs-rMBP:insider-web jeff [develop] $
到目前为止看起来不错,但在尝试部署后,我收到以下消息:
Jeffs-rMBP:insider-web jeff [develop] $ firebase deploy
Error: Authentication required.
Jeffs-rMBP:insider-web jeff [develop] $
这是我的原始divshot.json
文件:
Jeffs-rMBP:insider-web jeff [develop] $ cat divshot.json
{
"name": "insider-web",
"root": "./",
"clean_urls": true,
"error_page": "error.html",
"proxy": {
"api": {
"origin": "http://oa-mobile.herokuapp.com",
"headers": {
"Accept": "application/json"
},
"cookies": false,
"timeout": 30
}
}
}
Jeffs-rMBP:insider-web jeff [develop] $
这是生成的firebase.json
文件:
Jeffs-rMBP:insider-web jeff [develop] $ cat firebase.json
{
"firebase": "insider",
"public": "./",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
Jeffs-rMBP:insider-web jeff [develop] $
附加说明:我能够在firebase serve
本地成功运行和启动我的应用程序localhost:5000
- 我的初始登录页面成功呈现并且行为正确。