Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

"Error: Line 15: Unexpected token :" when invoking plugin #19

Open
SolarLiner opened this issue Aug 25, 2018 · 5 comments
Open

"Error: Line 15: Unexpected token :" when invoking plugin #19

SolarLiner opened this issue Aug 25, 2018 · 5 comments

Comments

@SolarLiner
Copy link

While invoking the plugin (both from the UI and through vue invoke), with defaults kept as is, the Vue CLI crashes with the following stacktrace:

Error: Line 15: Unexpected token :
    at ErrorHandler.constructError (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:5012:22)
    at ErrorHandler.createError (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:5028:27)
    at Parser.unexpectedTokenError (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:1985:39)
    at Parser.throwUnexpectedToken (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:1995:21)
    at Parser.expect (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2168:19)
    at Parser.parseGroupExpression (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2764:27)
    at Parser.inheritCoverGrammar (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2285:37)
    at Parser.parsePrimaryExpression (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2348:38)
    at Parser.inheritCoverGrammar (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2285:37)
    at Parser.parseLeftHandSideExpressionAllowCall (/home/solarliner/.nvm/versions/node/v10.9.0/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2899:26)
@razorfever
Copy link

razorfever commented Sep 23, 2018

Having the same problem. In my case it's line 41 though:

Invoking generator for vue-cli-plugin-i18n...
ERROR Error: Line 41: Unexpected token ...
Error: Line 41: Unexpected token ...
at ErrorHandler.constructError (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:5004:22)
at ErrorHandler.createError (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:5020:27)
at Parser.unexpectedTokenError (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:1985:39)
at Parser.throwUnexpectedToken (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:1995:21)
at Parser.parseObjectPropertyKey (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2492:33)
at Parser.parseObjectProperty (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2527:25)
at Parser.parseObjectInitializer (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2595:35)
at Parser.inheritCoverGrammar (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2278:37)
at Parser.parsePrimaryExpression (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2347:38)
at Parser.inheritCoverGrammar (/Users/razorfever/.config/yarn/global/node_modules/esprima/dist/esprima.js:2278:37)

@kazupon
Copy link
Member

kazupon commented Oct 2, 2018

Could you provide minimum repro repo please?

@hjJunior
Copy link

hjJunior commented Nov 9, 2018

Same problem here, running with vue ui when I add the plugin and done the setup I got this error.
I've tested this on node 8.11.3 (npm 5.6.0) and v10.11.0 (npm v6.4.1)

    at ErrorHandler.createError (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:5028:27)
    at Parser.unexpectedTokenError (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:1985:39)
    at Parser.throwUnexpectedToken (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:1995:21)
    at Parser.parseObjectPropertyKey (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2499:33)
    at Parser.parseObjectProperty (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2534:25)
    at Parser.parseObjectInitializer (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2602:35)
    at Parser.inheritCoverGrammar (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2285:37)
    at Parser.parsePrimaryExpression (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2354:38)
    at Parser.inheritCoverGrammar (/home/helio/.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/esprima/dist/esprima.js:2285:37)

@yoyoys
Copy link

yoyoys commented Feb 24, 2019

It's a typescript syntax error,
an easy workaround here: just comment declare section and installation works fine.

@nawordar
Copy link

Would it be possible to show the file where the error occurred? It would make debugging a lot easier.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants