【问题标题】:Cannot find module '@google-cloud/logging'找不到模块“@google-cloud/logging”
【发布时间】:2018-01-28 15:53:23
【问题描述】:

我是 firebase 函数的新手。在我的functions/index.js中我定义了:

const Logging = require('@google-cloud/logging');

当我运行 firebase deploy --debug 时,我不断收到 error

 Error parsing triggers: Cannot find module '@google-cloud/logging'

为什么会出现这个错误???

(顺便说一句,在firebase init 中,我选择了Functions)

【问题讨论】:

    标签: firebase google-cloud-functions


    【解决方案1】:

    在您将模块安装到您的项目中并且它出现在您的 package.json 中之前,您不能使用它。在您的 functions 文件夹中运行它:

    npm install @google-cloud/logging
    

    【讨论】:

      猜你喜欢
      • 2018-06-01
      • 2019-03-03
      • 1970-01-01
      • 2019-09-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-21
      • 2019-02-16
      相关资源
      最近更新 更多