Ama*_*mar 6 firebase firebase-hosting
当我通过firebase托管我的网页然后写入命令后,firebase deploy我收到以下错误:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\amarg\Desktop\amar>firebase init
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
C:\Users\amarg\Desktop\amar
Before we get started, keep in mind:
* You are initializing in an existing Firebase project directory
? Are you ready to proceed? Yes
? What Firebase CLI features do you want to setup for this folder? Hosting: Configure and deploy Firebase Hosting sites
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
i .firebaserc already has a default project, skipping
=== Hosting Setup
Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.
? What do you want to use as your public directory? public
? Configure as a single-page app (rewrite all urls to /index.html)? No
? File public/404.html already exists. Overwrite? No
i Skipping write of public/404.html
? File public/index.html already exists. Overwrite? No
i Skipping write of public/index.html
i Writing configuration info to firebase.json...
i Writing project information to .firebaserc...
+ Firebase initialization complete!
C:\Users\amarg\Desktop\amar>firebase deploy
=== Deploying to 'learningweb-6b2a3'...
i deploying hosting
+ database: rules ready to deploy.
i hosting: preparing public directory for upload...
Error: An unexpected error has occurred.
C:\Users\amarg\Desktop\amar>
小智 11
对我来说,更新firebase-tools解决了这个问题
在cmd提示符下运行命令
npm install -g firebase-tools
Run Code Online (Sandbox Code Playgroud)
然后再次尝试firebase init
就我而言,解决方法为:
firebase deploy --except functions
Run Code Online (Sandbox Code Playgroud)
小智 5
通过键入 exit 并按 Enter 关闭 IDE 的集成终端,然后重新打开它并发出命令 firebase deploy
如果上述选项不起作用,则只需在 linux/mac 中使用终端并在 windows 中使用 CMD 并导航到该文件夹然后给出firebase deploy命令
| 归档时间: |
|
| 查看次数: |
4590 次 |
| 最近记录: |