cloud-functions-emulator
cloud-functions-emulator copied to clipboard
Can't deploy to emulator - ERROR: RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range.
the function I am trying to commit is
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
app.intent(Intents.DEFAULT_WELCOME_INTENT, (conv) => {
conv.ask(`Hi! This is the Welcome intent?`);
});
I m running the following command
$ functions deploy dialogflowFirebaseFulfillment --trigger-http
and I am getting the following error
Warning: You're using Node.js v10.6.0 but Google Cloud Functions only supports v6.11.5.
Copying file:///tmp/tmp-6962kIQZzTMOMHb7.zip...
Waiting for operation to finish...ERROR: RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -2147483648 and <= 2147483647. Received 4015075078
at checkInt (internal/buffer.js:35:11)
at writeU_Int32LE (internal/buffer.js:515:3)
at Buffer.writeInt32LE (internal/buffer.js:684:10)
at Object.entryHeaderToBinary (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/adm-zip/headers/entryHeader.js:216:18)
at Object.packHeader (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/adm-zip/zipEntry.js:260:39)
at /usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/adm-zip/zipFile.js:198:41
at Array.forEach (<anonymous>)
at Object.compressToBuffer (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/adm-zip/zipFile.js:182:23)
at Object.writeZip (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/adm-zip/adm-zip.js:454:32)
at client.generateUploadUrl.then.then (/usr/local/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:168:13)
I am using Node.js v10.6.0, emulator version 1.0.0-beta.4
Hey Chris, I encountered this issue earlier today, and I managed to fix it by changing my installed version of Node to 6.11.5
Switching to node 6.11.5 worked for me as well.