Skip to content

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

@edmundorobles

Description

@edmundorobles

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions