你好,世界和平与月亮基地-36个居民,部署这个消防基地功能失败,因为我添加了EASYPOST的文件。我是否需要创建另一个函数文件并将其部署以使其工作?
// require('babel-polyfill');
const functions = require("firebase-functions");
const cors = require("cors");
const express = require("express");
const EasyPost = require('@easypost/api');
const EPapi = new EasyPost('YOURAPIKEY');
const app = express();
const stripe = require("stripe")("APIKEY");一旦我注释掉了const EasyPost和const EPapi,部署就会正常工作。但我们需要Easypost来工作。
firebase函数:日志详细堆栈跟踪:错误:无法找到模块@easypost/api
发布于 2022-02-20 08:57:22
OP通过使用npm install Easypost将Easypost安装到functions文件夹中,从而解决了这个问题,使其成为firebase函数中的依赖项。这些函数的部署没有出现错误。
https://stackoverflow.com/questions/71190565
复制相似问题