我已经按照here中的所有步骤运行了“经典出租车:Google Play计费订阅Android应用Java示例”,但是在最后一步,我很困惑,因为我不清楚我应该如何部署后端,请按以下步骤操作:
这些是构建位于here的后端服务器代码的步骤>
npm install
以安装依赖项。firebase use --add {your_firebase_project_id}
firebase functions:config:set app.package_name="your_android_application_id"
firebase functions:config:set app.basic_plan_sku="your_basic_subscription_product_sku_id"
firebase functions:config:set app.premium_plan_sku="your_premium_subscription_product_sku_id"
firebase deploy
将您的后端部署到Firebase的Cloud Functions。在步骤上,尚不清楚服务器的部署方式,它仅提及应用程序ID和产品SKU,但未提及服务器代码,因此,我需要帮助来阐明这一点。我想逐步了解如何部署服务器。
这是我目前正在做的事情:1.转到服务器的根文件夹2.从该文件夹打开cmd3.运行文档中列出的命令。4.然后我得到这个错误:
=== Deploying to 'billing-project-c9f03'... i deploying functions, hosting Running command: npm --prefix "$RESOURCE_DIR" run lint npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\frank\Desktop\Billing app\ClassyTaxiServer\server\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\frank\Desktop\Billing app\ClassyTaxiServer\server\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\frank\AppData\Roaming\npm-cache\_logs\2020-04-13T01_21_30_198Z-debug.log Error: functions predeploy error: Command terminated with non-zero exit code429496323
但是我在根文件夹上看到了package.json文件。
我已经按照此处的所有步骤运行了“经典出租车:Google Play计费订阅Android应用Java示例”,但是在最后一步,我感到非常困惑,我不清楚。 ..
请参见Firebase CLI reference。这应该是项目的根目录ClassyTaxiServer
。假设您已经成功执行了前面的所有步骤,然后再尝试firebase deploy
。 firebase.json
知道该怎么做...但是,该文件是实际的问题;参见firebase.json
。