如何从firebase-admin@5.12.0更新到firebase-admin@6.0.0?

时间:2018-08-16 15:48:53

标签: firebase npm google-cloud-functions firebase-admin

1。 D:\ Firebase> npm install firebase-functions @ latest firebase-admin @ latest --save

  

firebase-functions@2.0.5安装后D:\ Firebase \ node_modules \ firebase-functions

     

节点./upgrade-warning

======== WARNING! ========

This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.

To see a complete list of these breaking changes, please go to:

https://firebase.google.com/docs/functions/beta-v1-diff

npm WARN saveError ENOENT: no such file or directory, open 'D:\Firebase\package.json'

- mime-db@1.35.0 node_modules\compressible\node_modules\mime-db

- mime-db@1.35.0 node_modules\request\node_modules\mime-db

- mime-types@2.1.19 node_modules\request\node_modules\mime-types

D:\Firebase

+-- firebase-admin@6.0.0

| +-- @google-cloud/storage@1.7.0

| | +-- compressible@2.0.14

| | | `-- mime-db@1.35.0

| | `-- mime-types@2.1.19

| `-- @types/node@8.10.26

`-- firebase-functions@2.0.5

npm WARN enoent ENOENT: no such file or directory, open 'D:\Firebase\package.json'

npm WARN Firebase No description

npm WARN Firebase No repository field.

npm WARN Firebase No README data

npm WARN Firebase No license field.
  1. D:\ Firebase \ functions> npm install --save firebase-functions @ latest
  

firebase-functions@2.0.5安装后D:\ Firebase \ functions \ node_modules \ firebase-functions   节点./upgrade-warning

======== WARNING! ========

This upgrade of firebase-functions contains breaking changes if you are upgrading from a version below v1.0.0.

To see a complete list of these breaking changes, please go to:

https://firebase.google.com/docs/functions/beta-v1-diff

functions@ D:\Firebase\functions

+-- UNMET PEER DEPENDENCY firebase-admin@5.12.0

`-- firebase-functions@2.0.5

npm WARN firebase-functions@2.0.5 requires a peer of firebase-admin@~6.0.0 but none was installed.

  1. 我选中“ package.json

    “依赖项”:{     “ firebase-admin”:“〜5.12.0”,     “ firebase-functions”:“ ^ 2.0.5”   },

如何从firebase-admin@5.12.0更新到firebase-admin@6.0.0?

非常感谢。

2 个答案:

答案 0 :(得分:7)

要为您的Cloud Functions项目获取任何npm模块的最新版本:

cd functions
npm install firebase-admin@latest

答案 1 :(得分:0)

就我而言,我一直在 / [project] / functions 下运行npm installnpm install firebase-admin@latest(如警告消息本身所建议),并得到相同的警告。

我意识到我已经忘记运行此更新:

npm install --save firebase-functions@latest