Coder Social home page Coder Social logo

Unexpected token about matrix-puppet-hangouts HOT 6 CLOSED

hooger avatar hooger commented on June 3, 2024
Unexpected token

from matrix-puppet-hangouts.

Comments (6)

ericmigi avatar ericmigi commented on June 3, 2024

same issue on ubuntu 18.04, fresh install when trying to generate hangouts-registration.yaml file with node index.js -r -u "http://127.0.0.1:8090"

from matrix-puppet-hangouts.

thomas-profitt avatar thomas-profitt commented on June 3, 2024

@hooger @ericmigi , would you both run node --version? This could be caused by an old node version (node 10 is known to work, we expect node 8 does too, but no earlier version, and node is packaged strangely on Debian-based distributions by default)

from matrix-puppet-hangouts.

ericmigi avatar ericmigi commented on June 3, 2024

root@matrix-synapse:~# node -v
v8.10.0

from matrix-puppet-hangouts.

thomas-profitt avatar thomas-profitt commented on June 3, 2024

@hooger @ericmigi Would you pull the latest master, which includes that commit up there, and test again?

I was able to reproduce this on node 8, using the REPL in Docker's official node 8 image:

> docker run -i -t --rm node:8-alpine node

> try {
...   var data = JSON.parse(str);
...   debugVerbose("emitting message", data);
...   this.emit('message', data);
... } catch {
} catch {
        ^

SyntaxError: Unexpected token {

>

I've gathered that, while try { } catch { } works in node 10 and node 11, try { } catch(error) { } is required in node 8, so I've added the parameter to appease it.

from matrix-puppet-hangouts.

thomas-profitt avatar thomas-profitt commented on June 3, 2024

(Heard that this was working outside my REPL, woo!)

from matrix-puppet-hangouts.

hooger avatar hooger commented on June 3, 2024

My node is 9.x and it works for me as well.
Thank you for the help!

from matrix-puppet-hangouts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.