问题
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