Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SyntaxError: Unexpected token at pug-code-gen/index.js #2866

Comments

@edmundorobles
Copy link

I have installed pug and pug-cli on debian Jessie:
pug version: 2.0.0-rc.4
pug-cli version: 1.0.0-alpha6

When i tried to compile: echo 'p#myid.myclass' | pug i got the following error:

/usr/local/lib/node_modules/pug-cli/node_modules/pug/node_modules/pug-code-gen/index.js:813
  attributeBlocks(attrBlcks) {
                 ^
SyntaxError: Unexpected token (
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/pug-cli/node_modules/pug/lib/index.js:21:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

if change the line **attributeBlocks(attrBlcks) ** to **attributeBlocks:function (attrBlcks) ** it works fine

droooney added a commit that referenced this issue Sep 9, 2017
@edmundorobles
Copy link
Author

thank you

@droooney
Copy link
Member

This is not merged or published yet.

@juoni
Copy link

juoni commented Sep 23, 2017

Awesome , thanks a lot

ForbesLindesay pushed a commit that referenced this issue Sep 25, 2017
@sergejjkim
Copy link

thanks! that helped

@David-S-Hunsicker
Copy link

This should really get merged. Not sure why it isn't yet.

@droooney
Copy link
Member

droooney commented Feb 3, 2018

@David-S-Hunsicker it is merged

@Stylll
Copy link

Stylll commented Feb 4, 2018

Thanks a lot. Great help!

@pugjs pugjs locked as resolved and limited conversation to collaborators Feb 5, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.