How to set using node engine version 10 in dialogflow inline fulfilment package.json?

萝らか妹 提交于 2021-01-28 06:05:14

问题


How to set using node engine version 10 in dialogflow inline fulfilment package.json?

I try to set it in package.json

"engines": {
    "node": "10"
}

But in my Firebase project, deployed fulfilment cloud function remains use 'Node.js 8'.


回答1:


As of a few days ago, the Dialogflow inline fulfillment uses Node 10 (and you cannot switch back to Node 8). The downside of this is that you must have billing enabled for the GCP project your dialogflow agent is associated with, as under-the-hood the inline fulfillment uses Cloud Build to deploy.

If you want a free way to deploy your functions in Node 10, then I suggest using Firebase Functions, and using the engines: { node: 10; } as you identified in your initial question to request the Node 10 runtime.




回答2:


Don't use the Inline editor, it has some bugs as of now. You can use Firebase CLI to host the fulfillment code.



来源:https://stackoverflow.com/questions/62962904/how-to-set-using-node-engine-version-10-in-dialogflow-inline-fulfilment-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!