bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.78k stars 1.32k forks source link

Invoking generator for vue-cli-plugin-i18n, vue-cli-plugin-django error (esprima) #67

Closed katonada closed 5 years ago

katonada commented 6 years ago

Hi,

I cannot install and invoke vue-cli-plugin-i18n (and vue-django) 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).

I have ongoing project based on vue-enterprise-boilerplate but same thing happens when freshly install vue-enterprise-boilerplate.

I tested another template, https://vuejs-templates.github.io/webpack/ installing it by Vue CLI or by clonning, adding plugins works fine.

Steps to reproduce Install vue-enterprise-boilerplate first then 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: vue-cli-plugin-vuex-module-generator works fine when invoked

gwenaelp commented 5 years ago

Hi,

Any known fix for this error?

chrisvfritz commented 5 years ago

This isn't something we can fix here unfortunately. I recommend opening an issue on the vue-cli-plugin-i18n repo.