-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Why are there no parentheses after the catch statement #42
Comments
Just to be specific, you mean this: const run = async (fn, resolve, ...args) => {
activeCount++;
// TODO: Get rid of 'pTry'. It's not needed anymore.
const result = pTry(fn, ...args);
resolve(result);
try {
await result;
} catch {}
next();
}; Should be that: const run = async (fn, resolve, ...args) => {
activeCount++;
// TODO: Get rid of 'pTry'. It's not needed anymore.
const result = pTry(fn, ...args);
resolve(result);
try {
await result;
} catch (e) {}
next();
}; Otherwise it cause this:
|
Yes, the problem I encountered is this error ! |
Okay so while i encountered this error running Node v8.17 after installing v12 everything is fine. Try updating Node or using NVM to use different versions of Node. Edit: In code view you can see comment that states that package require Node v10 or newer. I think this should be clearly stated in readme. |
Duplicate of #33 |
That would be something to bring up on https://github.com/npm/cli/issues |
It's defined in package.json in pretty much all npm packages. That's just how it works. I don't intend to duplicate that information in multiple places. |
I don’t know if this is a new way of writing, but there will be an error without parentheses 😱
The text was updated successfully, but these errors were encountered: