Skip to content

functions/scheduleinstance does not run as nodejs8 or nodejs10 #1272

@nbards

Description

@nbards

When following through the tutorial about Cloud Scheduler [https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule#set_up_the_functions_with] and deploying the function as node.js 6 a warning is thrown about the deprecation of node.js 6 and reccomends node.js 8 or node.js 10.

the package.json file states

  "engines": {
"node": ">=8"

but deploying the function as nodejs8 gives this error

 "TypeError: callback is not a function
    at exports.stopInstancePubSub (/srv/index.js:105:5)
    at /worker/worker.js:825:24
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)"  

and nodejs10 gives this one

 "TypeError: callback is not a function
    at exports.stopInstancePubSub (/srv/functions/index.js:105:5)
    at Promise.resolve.then (/srv/node_modules/@google-cloud/functions-framework/build/src/invoker.js:330:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)"  

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions