opentrace-community / opentrace-cloud-functions

OpenTrace Cloud Functions. Reference implementation of the BlueTrace protocol.
https://bluetrace.io
GNU General Public License v3.0
273 stars 121 forks source link

error: functions/lib/index.js does not exist, can't deploy Cloud Functions #46

Closed alexissinglaire closed 4 years ago

alexissinglaire commented 4 years ago

Hi, I encountered the following error when running the 'firebase deploy' command. is it anything to with parameter regions in config.ts?

Please kindly help.

Following my environment: OS: Debian 10 Node: v10.20.1 Npm: v6.14.4 Firebase tools: v8.2.0

======================================================= ⚠ functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.

=== Deploying to 'mytracetogetherproject'...

i deploying functions Running command: npm --prefix "$RESOURCE_DIR" run lint

functions@ lint /home/alexisdemo009/functions tslint --project tsconfig.json

Running command: npm --prefix "$RESOURCE_DIR" run build

functions@ build /home/alexisdemo009/functions tsc

✔ functions: Finished running predeploy script. i functions: ensuring required API cloudfunctions.googleapis.com is enabled... ✔ functions: required API cloudfunctions.googleapis.com is enabled i functions: preparing functions directory for uploading...

Error: Error occurred while parsing your function triggers.

Error: You must specify at least one region at assertRegionsAreValid (/home/alexisdemo009/functions/node_modules/firebase-functions/lib/function-builder.js:59:15) at FunctionBuilder.region (/home/alexisdemo009/functions/node_modules/firebase-functions/lib/function-builder.js:107:13) at Object.https (/home/alexisdemo009/functions/lib/firebaseFunctions.js:13:10) at Object. (/home/alexisdemo009/functions/lib/index.js:11:45) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17)

Having trouble? Try firebase [command] --help

makinggainz commented 3 years ago

What was the solution?