I'm trying to deploy a node script on google cloud functions but I keep getting this error. It works perfectly fine locally, but the log of the function outputs the following:
TypeError: this.transport.get is not a function at EndpointRequest.WPRequest.then (/workspace/node_modules/wpapi/lib/constructors/wp-request.js:776:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) E callme uh3svoyqbl4j 2021-02-19 23:42:49.692 Error: Process exited with code 16 at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:275:22) at process.emit (events.js:327:22) at process.EventEmitter.emit (domain.js:483:12) at process.exit (internal/process/per_thread.js:167:15) at Object.sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:37:9) at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:271:22) at process.emit (events.js:315:20) at process.EventEmitter.emit (domain.js:483:12) at processPromiseRejections (internal/process/promises.js:209:33) at processTicksAndRejections (internal/process/task_queues.js:98:32)
I'm trying to deploy a node script on google cloud functions but I keep getting this error. It works perfectly fine locally, but the log of the function outputs the following:
TypeError: this.transport.get is not a function at EndpointRequest.WPRequest.then (/workspace/node_modules/wpapi/lib/constructors/wp-request.js:776:24) at processTicksAndRejections (internal/process/task_queues.js:97:5) E callme uh3svoyqbl4j 2021-02-19 23:42:49.692 Error: Process exited with code 16 at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:275:22) at process.emit (events.js:327:22) at process.EventEmitter.emit (domain.js:483:12) at process.exit (internal/process/per_thread.js:167:15) at Object.sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:37:9) at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:271:22) at process.emit (events.js:315:20) at process.EventEmitter.emit (domain.js:483:12) at processPromiseRejections (internal/process/promises.js:209:33) at processTicksAndRejections (internal/process/task_queues.js:98:32)