creativetimofficial / ct-vue-now-ui-dashboard-pro

Vue Now UI Dashboard PRO - PREMIUM BOOTSTRAP 4 VUEJS ADMIN TEMPLATE
https://www.creative-tim.com/product/vue-now-ui-dashboard-pro
16 stars 9 forks source link

syntax error on routes #6

Closed ekuzu closed 6 years ago

ekuzu commented 6 years ago

ERROR Failed to compile with 1 errors 11:56:54

error in ./src/routes/routes.js

Syntax Error: 15 | 16 | // Pages

17 | const User = ()=> import('src/pages/Dashboard/Pages/UserProfile.vue'); | ^ 18 | const Pricing = ()=> import('src/pages/Dashboard/Pages/Pricing.vue'); 19 | const TimeLine = ()=> import('src/pages/Dashboard/Pages/TimeLinePage.vue'); 20 | const Login = ()=> import('src/pages/Dashboard/Pages/Login.vue');

cristijora commented 6 years ago

Hi Enric. Will paste the email response here. Please make sure you have .babelrc file inside the project. Many people use mac and when they copy stuff from the archive they miss the .babelrc file since its hidden on mac by default. If that's not the issue, please let me know.

gamcoh commented 6 years ago

Hi i have the same issue despite the fact that i do have the babelrc file at the root of my project.

The error is: [eslint] Parsing error: unexpected token import

cristijora commented 6 years ago

@gamcoh can you show the full error for this case ? If it's a linting error that can be fixed by adding ignore rules for dynamic imports.

gamcoh commented 6 years ago

routes.js [eslint] Parsing error: Unexpected token import (20:20) const User = () => import('src/pages/Dashboard/Pages/UserProfile.vue');

but i think this error is generated by my code editor (VS code) because i don't get the error when the code compile or in the navigator console.

cristijora commented 6 years ago

A common problem for MAC users is that because of hidden files, .bablerc file is not copied from the archive. If everything works, but you have a linting error, most likely it's due to the editor. If the problem persists, feel free to reopen the issue