Skip to content
This repository has been archived by the owner on Oct 7, 2019. It is now read-only.

SyntaxError: import declarations may only appear at top level of a module #10

Closed
saleh-old opened this issue Jan 18, 2017 · 5 comments
Closed

Comments

@saleh-old
Copy link

Hi
I just installed though the instructions and this is what I get after running the dev server:
SyntaxError: import declarations may only appear at top level of a module

Any idea how to fix it?

@centrual
Copy link

centrual commented Jan 18, 2017

Hello @sullyfischer

I tested with #6 there is no error.

It's probably about nodejs version.

if you'r using cordova, check this too: https://github.com/centrual/cordova-template-framework7-vue-webpack

@saleh-old
Copy link
Author

@centrual Thank you for responding. My nodeJS version is the latest. I also tried what you the link you recommended but couldn't get it running. I'm new to the whole phonegap thing but I'm good with Vue. Could you please tell me if I can just use vue-cli, vue-router and vue-resource to create my mobile app and then just push it into phonegap and be done with it? Or must I start with such packages such as Framework7?

Thanks again

@centrual
Copy link

Interesting, can you write your cordova version, browser name and version, OS name? Your problem is so interesting, because people using this templates without error.

Mobile frameworks like framework7, ionic, onsen etc... helping a lot when you developing an mobile app. Because you can do everything so fast with this frameworks. But you can run your boutique package in phone too. There is so much thing you need to make if you don't want to use frameworks like: page transitions, history, caching, ajax and most importantly performant html-css. I doesn't writing language translation etc, because vue has good packages for that.

So my answer is yes and no at same time. It changes depends on what do you want. I mostly recommending use framework.

@saleh-old
Copy link
Author

seems like I was running wrong commands. I tried phonegap run browser -- --lr and it worked.
So with this framework I don't need to use Vue-router and Vue-resource?!

@centrual
Copy link

centrual commented Jan 18, 2017

Yes, you don't need Vue-router, framework7-vue has router already.
You don't need Vue-resource too, because framework7 has Dom7; and Dom7 has ajax methods (same as jQuery).

If you have cordova, i recommend to use cordova run browser -- --lr, because phonegap cli doesn't displaying informations. but you can use phonegap too if you want.

Have a great day!

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

3 participants