menu

Cloud Functions: Qwik Start - Command Line

Go to Lab

19 Reviews

47945d916c0e1cfca4c17e60aa71d667

google233454_student@qwiklabs-gcp-84ed6bc25a2b5b5e:~/gcf_hello_world$ gcloud beta functions deploy helloWorld --stage-bucket mliu-bucket3 --trigger-topic hello_world Deploying function (may take a while - up to 2 minutes)...failed. ERROR: (gcloud.beta.functions.deploy) OperationError: code=3, message=Function load error: Code in file index.js can't be loaded. Is there a syntax error in your code? Detailed stack trace: /user_code/index.js:1 (function (exports, require, module, __filename, __dirname) { loud Function. ^^^^^^^^ SyntaxError: Unexpected identifier at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Module._compile (module.js:542:28) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at getUserFunction (/var/tmp/worker/worker.js:373:24) google233454_student@qwiklabs-gcp-84ed6bc25a2b5b5e:~/gcf_hello_world$ more index.js loud Function. * * * @param {object} event The Cloud Functions event. * * @param {function} callback The callback function. * */ exports.helloWorld = function helloWorld (event, callback) { console.log(`My Cloud Function: ${event.data.message}`); callback(); }; google233454_student@qwiklabs-gcp-84ed6bc25a2b5b5e:~/gcf_hello_world$

Michael L. · Reviewed 3 days ago

8d9f395b57f308a9cf54c5c1fab95471

...

JESSICA M. · Reviewed 3 days ago

86d089255344c8b12dd94a628ff05649

Itay B. · Reviewed 4 days ago

627823461ebf90c31f3a91854cb92dd5

Mattias A. · Reviewed 5 days ago

E692705699b926a708d290ca8c2b6a19

Conor A. · Reviewed 7 days ago

3efe2afb1142de4bba4e5fee71058182

Bruna G. · Reviewed 10 days ago

A5220d613c7465e6632d72bafd388c13

Anders N. · Reviewed 10 days ago

Fb4a0b8300ddfad06300d3a1c76988d5

Juanjo M. · Reviewed 10 days ago

20ca1e14ff216eb395617c8bd6a55e0d

Andrew W. · Reviewed 11 days ago

3170ae579619b96bd379d2e40785ea65

Mohamed I. · Reviewed 11 days ago

49be39d173464d847c1cd2347cbcf1df

The index.js has a set of apostrophes instead of a single quotation set.

Damia P. · Reviewed 12 days ago

3a0c69f96ea6a85dd1164880495df58d

Nawin P. · Reviewed 12 days ago

F28d41386c87bf2bae7fa3cf2c5be906

Iyad A. · Reviewed 20 days ago

F75514e3db0044cb11bdeeff8b59f580

I'm making my way through these lessons but I wish I knew more of what I was accomplishing... as well as what the normal issues and fixes are that take place around certain areass related to each lesson.

Priscilla P. · Reviewed 20 days ago

6e45ab72c77669f9dc6336d71a132d65

Jim C. · Reviewed 22 days ago

A4ade178d5f67f10638b5d0a4331ce22

Cool lab! Thank you!

Harold Lawrence M. · Reviewed 27 days ago

583d00af1cb2d79ef710d0257a953890

excellent

sekher babu r. · Reviewed 30 days ago

Acfdff2e64b90166e87c9b03a809a47c

Good exercise - could do with some more explanation regarding what the function is actually doing and how it interacts with pub/sub.

richard r. · Reviewed about 1 month ago

B5a794a3a24d5931683a9ab16f939c52

Thomas J. · Reviewed about 2 months ago