You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FirebaseCLI Feature : Functions: Configure and deploy Cloud Functions
Language: TypeScript
cd functions
Uncomment the helloWorld function from index.ts
npm run serve
[REQUIRED] Steps to reproduce
Same as Test Case above
[REQUIRED] Expected behavior
The npm run serve command should run without any error
[REQUIRED] Actual behavior
[debug] [2019-07-09T05:18:30.659Z] ----------------------------------------------------------------------
[debug] [2019-07-09T05:18:30.665Z] Command: C:\Program Files\nodejs\node.exe C:\Users\<my-pc-username>\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js functions:shell
[debug] [2019-07-09T05:18:30.665Z] CLI Version: 7.0.2
[debug] [2019-07-09T05:18:30.665Z] Platform: win32
[debug] [2019-07-09T05:18:30.665Z] Node Version: v8.12.0
[debug] [2019-07-09T05:18:30.667Z] Time: Tue Jul 09 2019 10:48:30 GMT+0530 (India Standard Time)
[debug] [2019-07-09T05:18:30.667Z] ----------------------------------------------------------------------
[debug]
[debug] [2019-07-09T05:18:30.691Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2019-07-09T05:18:30.693Z] > authorizing via signed-in user
[debug] [2019-07-09T05:18:30.693Z] [iam] checking project <my-project-id> for permissions ["firebase.projects.get"]
[debug] [2019-07-09T05:18:30.702Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/<my-project-id>:testIamPermissions
[debug] [2019-07-09T05:18:32.555Z] <<< HTTP RESPONSE 200
[debug] [2019-07-09T05:18:32.569Z] [functions] Using node@8 from host.
[debug] [2019-07-09T05:18:32.570Z] >>> HTTP REQUEST GET https://cloudresourcemanager.googleapis.com/v1/projects/<my-project-id>
[debug] [2019-07-09T05:18:34.162Z] <<< HTTP RESPONSE 200
[debug] [2019-07-09T05:18:34.163Z] >>> HTTP REQUEST GET https://mobilesdk-pa.googleapis.com/v1/projects/674100845266:getServerAppConfig
[debug] [2019-07-09T05:18:34.498Z] <<< HTTP RESPONSE 200
[info] + functions: Emulator started at http://localhost:5001
[debug] [2019-07-09T05:18:34.510Z] [functions] Watching "C:\<my-project-folder>\functions" for Cloud Functions...
[debug] [2019-07-09T05:18:36.152Z] DEBUG: Functions runtime initialized.
[debug] [2019-07-09T05:18:36.154Z] DEBUG: Disabled runtime features: {"functions_config_helper":true,"network_filtering":true,"timeout":true,"memory_limiting":true,"protect_env":true,"admin_stubs":true}
[debug] [2019-07-09T05:18:36.433Z] DEBUG: firebase-admin has been stubbed.
[warn] ! TypeError: _onRequestWithOpts is not a function
at Object.httpsProvider._onRequestWithOpts (C:\Users\<my-pc-username>\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:278:24)
at Object.httpsProvider.onRequest (C:\Users\<my-pc-username>\AppData\Roaming\npm\node_modules\firebase-tools\lib\emulator\functionsEmulatorRuntime.js:283:34)
at Object.<anonymous> (C:\<my-project-folder>\functions\lib\index.js:7:38)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
[warn] ! We were unable to load your functions code. (see above)
- It appears your code is written in Typescript, which must be compiled before emulation.
- You may be able to run "npm run build" in your functions directory to resolve this.
Were you able to successfully deploy your functions?
Yes, deployment was successful. It seems the issue is with testing locally only.
The text was updated successfully, but these errors were encountered:
Related issues
No
[REQUIRED] Version info
node:
v8.12.0
firebase-functions:
^3.0.0
firebase-tools:
7.0.2
firebase-admin:
^8.0.0
[REQUIRED] Test case
helloWorld
function fromindex.ts
[REQUIRED] Steps to reproduce
Same as Test Case above
[REQUIRED] Expected behavior
The
npm run serve
command should run without any error[REQUIRED] Actual behavior
Were you able to successfully deploy your functions?
Yes, deployment was successful. It seems the issue is with testing locally only.
The text was updated successfully, but these errors were encountered: