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

Error on try catch block #31

Closed
ajrsws opened this issue Jul 1, 2020 · 3 comments
Closed

Error on try catch block #31

ajrsws opened this issue Jul 1, 2020 · 3 comments

Comments

@ajrsws
Copy link

ajrsws commented Jul 1, 2020

I'm trying to deploy a function to firebase, and looks like one of the packages I use, uses p-limit, and when trying to deploy the function, in the installation modules package the console gives me the following error:

Detailed stack trace: /srv/node_modules/p-limit/index.js:30
} catch {}

inspecting the p-limit code in my node_modules I see this in line 28

try { await result; } catch {}

there's an error in the catch expression, is missing the parenthesis after catch, catch(error) {}

Firebase functions uses node version 8

https://github.com/sindresorhus/p-limit/blob/master/index.js#L30

7ochem added a commit to 7ochem/p-limit that referenced this issue Jul 2, 2020
7ochem added a commit to 7ochem/p-limit that referenced this issue Jul 2, 2020
7ochem added a commit to 7ochem/p-limit that referenced this issue Jul 2, 2020
@sindresorhus
Copy link
Owner

This package requires Node.js 10:

"node": ">=10"

You could downgrade to an older version.

@7ochem
Copy link

7ochem commented Jul 3, 2020

I have tried this on node 12. Let me check again, just to be sure

@7ochem
Copy link

7ochem commented Jul 3, 2020

I have tried this on node 12. Let me check again, just to be sure

Ok it works in node 10 and 12. Sorry for that 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants