Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] in sample: delete-unused-accounts-cron #953

Closed
polarby opened this issue Feb 3, 2022 · 1 comment
Closed

[BUG] in sample: delete-unused-accounts-cron #953

polarby opened this issue Feb 3, 2022 · 1 comment

Comments

@polarby
Copy link

polarby commented Feb 3, 2022

How to reproduce the issue

Deploy function or run the function locally via the shell.

Debug output

TypeError: PromisePool is not a constructor

irebase > ⚠  functions: TypeError: PromisePool is not a constructor
    at /Users/*/Documents/*/*-Backend/functions/external/user/user_cleanUp.js:34:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runFunction (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:547:9)
    at async runBackground (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:559:5)
    at async processBackground (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:542:5)
    at async invokeTrigger (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:624:13)
    at async handleMessage (/usr/local/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js:717:9)
⚠  Your function was killed because it raised an unhandled error.

Actual behavior

Run function as described in docs.

@polarby
Copy link
Author

polarby commented Feb 6, 2022

Changed the import to const PromisePool = require('es6-promise-pool');and it worked. Also, make sure to have es6-promise-pool installed. (Call npm i es6-promise-pool)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant