question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
yoyoyscommented, Feb 24, 2019

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

1reaction
razorfevercommented, 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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Error: Line 15: Unexpected token :" when invoking plugin #19
It's a typescript syntax error, an easy workaround here: just comment declare section and installation works fine. 2
Read more >
ESLint Parsing error: Unexpected token - Stack Overflow
Unexpected token errors in ESLint parsing occur due to incompatibility between your development environment and ESLint's current parsing ...
Read more >
Uncaught SyntaxError: Unexpected token ')' | WordPress.org
All of a sudden all our websites using your plugin have an the following error message in the cached footer js: Uncaught SyntaxError:...
Read more >
React function unexpected token expected
React "see" the useState call and return us [undefined, fn]. jsx: Unexpected token, expected , (56:5) 54 | let tree1 = this. php:...
Read more >
Eslint unexpected token typescript - Agenzia traduzioni Terni
Using the . It works just like node Eslint Unexpected Token Typescript. url - Parsing error: Unexpected token import Be sure to set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found