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

Try/catch block failing in Jenkins build #37

Closed
andreidobrinski opened this issue Jul 30, 2020 · 1 comment
Closed

Try/catch block failing in Jenkins build #37

andreidobrinski opened this issue Jul 30, 2020 · 1 comment

Comments

@andreidobrinski
Copy link

Environment

React app, bundled with Webpack, deployed with Jenkins. Using p-limit through terser-webpack-plugin.

Issue

Jenkins build fails with console output:

/path/to/repo/node_modules/terser-webpack-plugin/node_modules/p-limit/index.js:30
		} catch {}
		        ^

SyntaxError: Unexpected token {

Suggestion

I think it's expecting a condition to follow the catch keyword on index.js:30

Perhaps changing the following might work.

try {
  await result;
} catch {}

to

try {
  await result;
} catch (error) {}

Thanks! Please let me know if I can help further

@sindresorhus
Copy link
Owner

Duplicate of #33

@sindresorhus sindresorhus marked this as a duplicate of #33 Jul 31, 2020
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

No branches or pull requests

2 participants