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

SyntaxError: Unexpected } catch {} #1274

Closed
dfrankes opened this issue Aug 21, 2020 · 3 comments
Closed

SyntaxError: Unexpected } catch {} #1274

dfrankes opened this issue Aug 21, 2020 · 3 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: question Request for information or clarification. Not an issue.

Comments

@dfrankes
Copy link

#391

Environment details

  • OS: OSX
  • Node.js version: v12.14.1
  • npm version: 6.13.4
  • @google-cloud/storage version: ^5.1.1
  • npm package installed on meteor 1.8.1

Steps to reproduce

  1. ? npm install @google-cloud/storage
  2. ? start app (running inside meteor)

logs

W20200821-10:38:31.710(2)? (STDERR) /Users/dfrankes/Documents/GitHub/portaal/node_modules/@google-cloud/storage/node_modules/p-limit/index.js:30
W20200821-10:38:31.711(2)? (STDERR) } catch {}
W20200821-10:38:31.711(2)? (STDERR) ^
W20200821-10:38:31.711(2)? (STDERR)
W20200821-10:38:31.712(2)? (STDERR) SyntaxError: Unexpected token {
W20200821-10:38:31.712(2)? (STDERR) at createScript (vm.js:80:10)
W20200821-10:38:31.712(2)? (STDERR) at Object.runInThisContext (vm.js:139:10)
W20200821-10:38:31.712(2)? (STDERR) at Module._compile (module.js:617:28)
W20200821-10:38:31.713(2)? (STDERR) at Object.Module._extensions..js (module.js:664:10)
W20200821-10:38:31.713(2)? (STDERR) at Module.load (module.js:566:32)
W20200821-10:38:31.713(2)? (STDERR) at tryModuleLoad (module.js:506:12)
W20200821-10:38:31.713(2)? (STDERR) at Function.Module._load (module.js:498:3)
W20200821-10:38:31.713(2)? (STDERR) at Module.require (module.js:597:17)
W20200821-10:38:31.714(2)? (STDERR) at require (internal/module.js:11:18)
W20200821-10:38:31.714(2)? (STDERR) at Object. (/Users/dfrankes/Documents/GitHub/portaal/node_modules/@google-cloud/storage/build/src/bucket.js:25:16)
W20200821-10:38:31.714(2)? (STDERR) at Module._compile (module.js:653:30)
W20200821-10:38:31.714(2)? (STDERR) at Object.Module._extensions..js (module.js:664:10)
W20200821-10:38:31.714(2)? (STDERR) at Module.load (module.js:566:32)
W20200821-10:38:31.715(2)? (STDERR) at tryModuleLoad (module.js:506:12)
W20200821-10:38:31.715(2)? (STDERR) at Function.Module._load (module.js:498:3)
W20200821-10:38:31.715(2)? (STDERR) at Module.require (module.js:597:17)

More info

If i change the file myself (in the node_modules folder and change catch {} to cache (e) {} the app runs fine.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Aug 21, 2020
@dfrankes dfrankes changed the title SyntaxError: Unexpected token { SyntaxError: Unexpected } catch {} Aug 21, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Aug 22, 2020
@stephenplusplus
Copy link
Contributor

Maybe this is an issue with Meteor? sindresorhus/p-limit#33

@stephenplusplus stephenplusplus added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Aug 25, 2020
@Yatanvesh
Copy link

It Seems this error is due to older version of nodeJS, try upgrading to nodeJS 12, catch{} is supported.

@edub008
Copy link

edub008 commented Oct 10, 2020

It Seems this error is due to older version of nodeJS, try upgrading to nodeJS 12, catch{} is supported.

Thank you @Yatanvesh ! I was stuck on this error for a while upgrading and downgrading Terser, TWP, and others and after updating Docker image node version to 12.0.0 it resolved the error for me. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

5 participants