在 Firebase CLI 中为 Flutter 应用程序安装 Stripe 依赖项

Installing Stripe dependencies in Firebase CLI for a Flutter app

我正在尝试将 Stripe 集成到我的 Flutter 应用程序中。

我已经完成了它的 Flutter 部分,现在我正在尝试使用 Firebase 云功能来管理 Stripe 支付的服务器端部分。

我已经在 Mac 上安装了 Firebase CLI。

然后我打开Mac终端并输入命令

firebase init

然后我选择了 Functions 选项,然后我选择了一个现有项目,然后我选择了 JavaScript 作为语言,然后我选择了 YES 以使用 npm 安装依赖项。

那我已经把cd functions放到函数文件夹里了

在函数文件夹里面我放了npm install stripe --save

但显示错误:

我想知道我缺少什么来安装 Stripe 依赖项以用于我的 Firebase 项目。

看来你需要install Node.js and the npm command line interface

您问题中描述的前面步骤是正确的。

Install node with homebrew

brew install node