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安装进行升级--保存firebase-functions@latest它仍然给我同样的错误。
您的本地项目显然可以同时使用Firebase主机和云功能。错误消息告诉您Cloud Functions部署失败,这与Firebase Hosting没有任何关系。
如果你试图遵循这里输出的建议,你将不得不更改为";函数";文件夹,并运行npm命令来升级旧模块,并对package.json.进行任何其他更改