Firebase 是 Google 提供的一个工具。node
你能够将你的 Angular 项目部署上去。git
要使用 Firebase,首先须要安装 Firebase CLI。github
下载的地址为:Firebase CLI referencenpm
下载成功后,双击运行。windows
在不少时候,可能会 Windows 有提示权限不够,或者你程序有风险,这些你都须要接受风险才能进行下一步。工具
由于可能须要下载安装 visual studio,因此上面的过程会比较长。visual-studio
若是没提示退出,请耐心等待。开发工具
固然,你也能够使用 npm 直接进行安装。ui
安装的命令为: npm install -g firebase-tools
google
若是你获得了提示为
`gyp ERR! find VS You need to install the latest version of
Visual Studio gyp ERR! find VS including the "Desktop development with
C++" workload. gyp ERR! find VS For more information consult the
documentation at: gyp ERR! find VS
https://github.com/nodejs/nod...`
这是由于在 Firebase 安装的时候须要使用 visual studio 的 C++ 编译器来进行编译。
你能够选择下载 Windows 的 visual studio C++ 编译器。
目前,你能够下载最新的 2019 年构建版本,下载地址为: Download Visual Studio 2019 for Windows & Mac
在下载完成后,选择运行这个构建版本。
而后能够选择桌面开发工具同时包含有 C++
而后等待安装的完成。
若是安装还不成功的话,能够设置 npm config set msvs_version 2019
这个命令的意思是让 npm 使用 2019 年的版本进行编译。
若是你安装的是 2017 或者 2015 你也能够在命令行的后面设置不一样的版本。
而后再次运行:npm install -g firebase-tools
来进行安装。
若是一切顺利,你将可能会看到输出以下图所示。
上面的输出表示的是 firebase 已经安装成功了。
能够经过运行下面的命令:firebase -V
来检查安装的版本。
若是一切顺利,你将会看到已经安装成功的版本。
至此,说明你的 Firebase 已经配置成功,而且能够使用了。