Firebase 托管不允许我部署 bc firebase-functions 已过时
Firebase hosting doesn't let me deploy bc firebase-functions is outdated
functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.
=== Deploying to 'zootopia-mysite'...
i deploying functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /Users/zootopia/functions
> eslint .
✔ functions: Finished running predeploy script.
Error: There was an error reading functions/package.json:
Engines field is required but was not found in functions/package.json.
To fix this, add the following lines to your package.json:
"engines": {
"node": "10"
}
我也尝试过使用 npm install --save firebase-functions@latest 进行升级,但它仍然给我同样的错误。
您的本地项目显然适用于 Firebase 托管和 Cloud Functions。错误消息告诉您 Cloud Functions 部署失败,这与 Firebase 托管没有任何关系。
如果您尝试遵循此处输出的建议,您将不得不更改到“functions”文件夹和 运行 npm 命令以升级旧模块并制作任何其他更改为 package.json。
functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.
=== Deploying to 'zootopia-mysite'...
i deploying functions, hosting
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions@ lint /Users/zootopia/functions
> eslint .
✔ functions: Finished running predeploy script.
Error: There was an error reading functions/package.json:
Engines field is required but was not found in functions/package.json.
To fix this, add the following lines to your package.json:
"engines": {
"node": "10"
}
我也尝试过使用 npm install --save firebase-functions@latest 进行升级,但它仍然给我同样的错误。
您的本地项目显然适用于 Firebase 托管和 Cloud Functions。错误消息告诉您 Cloud Functions 部署失败,这与 Firebase 托管没有任何关系。
如果您尝试遵循此处输出的建议,您将不得不更改到“functions”文件夹和 运行 npm 命令以升级旧模块并制作任何其他更改为 package.json。