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.

Invoking generator for vue-cli-plugin-i18n error (esprima)

See original GitHub issue

Hi,

I cannot install and invoke vue-cli-plugin-i18n neither with Vue-cli (3.rc3) and not with VueUI. Tested on two computers (both: win10 home x64, node 8.10.0, npm 6.1.0, yarn 1.7.0).

Steps to reproduce vue add i18n

What is expected?

📦  Installing vue-cli-plugin-i18n...

yarn add v1.7.0
[1/5] Validating package.json...
[2/5] , [3/5] Fetching packages..., [4/5] ..., [5/5] Building fresh packages...
.......... truncated
info All dependencies
├─ dotenv@6.0.0
├─ flat@4.0.0
└─ vue-cli-plugin-i18n@0.3.1
Done in 34.04s.

✔  Successfully installed plugin: vue-cli-plugin-i18n

? The locale of project localization. en
? The locale of project fallback localization. en
? Enable locale messages in Single file components ? No

🚀  Invoking generator for vue-cli-plugin-i18n...

What is actually happening? After invoking I get error:

🚀  Invoking generator for vue-cli-plugin-i18n...
 ERROR  Error: Line 31: Unexpected token ...
Error: Line 31: Unexpected token ...
    at ErrorHandler.constructError (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:5004:22)
    at ErrorHandler.createError (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:5020:27)
    at JSXParser.Parser.unexpectedTokenError (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:1985:39)
    at JSXParser.Parser.throwUnexpectedToken (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:1995:21)
    at JSXParser.Parser.parseObjectPropertyKey (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:2492:33)
    at JSXParser.Parser.parseObjectProperty (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:2527:25)
    at JSXParser.Parser.parseObjectInitializer (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:2595:35)
    at JSXParser.Parser.inheritCoverGrammar (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:2278:37)
    at JSXParser.Parser.parsePrimaryExpression (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:2347:38)
    at JSXParser.parsePrimaryExpression (C:\Users\davor\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\esprima\dist\esprima.js:466:97)

Maybe will help: same thing is happening with vue-cli-plugin-django but vue-cli-plugin-vuex-module-generator works fine when invoked

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ahmetunazcommented, Apr 16, 2021

i also had same problem with Enterprise Boilerplate and finally solved my issue with comment out these lines in vue.config.js:

devServer: { …(process.env.API_BASE_URL ? // Proxy API endpoints to the production base URL. { proxy: { ‘/api’: { target: process.env.API_BASE_URL } } } : // Proxy API endpoints a local mock API. { before: require(‘./tests/mock-api’) }), }

to

devServer: { /* …(process.env.API_BASE_URL ? // Proxy API endpoints to the production base URL. { proxy: { ‘/api’: { target: process.env.API_BASE_URL } } } : // Proxy API endpoints a local mock API. { before: require(‘./tests/mock-api’) }), */ }

spread operator (…) is cause of the error for my issue.

1reaction
katonadacommented, Jul 2, 2018

OK, after fresh install of vue-enterprise-boilerplate, vue add i18n gives the same error.

After fresh install template from https://vuejs-templates.github.io/webpack/ with vue CLI, or by clonning plugin works fine so the problem is with enterprise boilerplate

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invoking generator for vue-cli-plugin-i18n error (esprima) #9
Hi, I cannot install and invoke vue-cli-plugin-i18n neither with Vue-cli (3.rc3) and not with VueUI. Tested on two computers (both: win10 ...
Read more >
vue-cli-plugin-i18n - Bountysource
While invoking the plugin (both from the UI and through vue invoke ), with defaults kept as is, the Vue CLI crashes with...
Read more >
Esprima
Esprima is a high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScript).
Read more >
The vue-cli-plugin-i18n from intlify - Coder Social
Invoking generator for vue-cli-plugin-i18n error (esprima). Hi,. I cannot install and invoke vue-cli-plugin-i18n neither with Vue-cli (3.rc3) and not with ...
Read more >
Appendix A. Syntax Tree Format - Esprima - Read the Docs
Note: In the following sections, interfaces are described using the syntax of TypeScript interface. Each node is represented as a regular JavaScript object ......
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