Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use version 1.0.0,it has error: Uncaught SyntaxError: Unexpected token import #40

Closed
mh0625 opened this issue Mar 28, 2017 · 4 comments
Assignees

Comments

@mh0625
Copy link

mh0625 commented Mar 28, 2017

I have install vue-grid-layout of version 1.0.0,then I use
import VueGridLayout from 'vue-grid-layout';
to import vue-grid-layout,it has error:Uncaught SyntaxError: Unexpected token import.

the error code is
vue-grid-layout/src/app.js line 29
import GridItem from './GridItem.vue';

@mh0625 mh0625 changed the title When When I use version 1.0.0,it has error: Uncaught SyntaxError: Unexpected token import Mar 28, 2017
@gmsa
Copy link
Contributor

gmsa commented Mar 28, 2017

Look at https://github.com/jbaysolutions/vue-grid-layout/blob/1.0.0/src/app.js for how to properly use the grid.

@gmsa gmsa added the question label Mar 28, 2017
@mh0625
Copy link
Author

mh0625 commented Mar 29, 2017

I want to use GridLayout.vue. What should I do?

@Tinoooo
Copy link

Tinoooo commented Apr 4, 2017

Same here. Whenever I try to import a component (import GridItem from 'vue-grid-layout/src/GridItem.vue';), I get the following error (probably from browserify).

{ Error: Parsing file C:\Users\xxx\node_modules\vue-grid-layout\src\GridItem.vue: Unexpected token (1:0)
    at Deps.parseDeps (C:\Users\xxx\node_modules\module-deps\index.js:481:28)
    at getDeps (C:\Users\xxx\node_modules\module-deps\index.js:414:40)
    at C:\Users\xxx\node_modules\module-deps\index.js:398:32
    at ConcatStream.<anonymous> (C:\Users\xxx\node_modules\concat-stream\index.js:36:43)
    at emitNone (events.js:91:20)
    at ConcatStream.emit (events.js:185:7)
    at finishMaybe (C:\Users\xxx\node_modules\concat-stream\node_modules\readable-stream\lib\_stream_writable.js:475:14)
    at endWritable (C:\Users\xxx\node_modules\concat-stream\node_modules\readable-stream\lib\_stream_writable.js:485:3)
    at ConcatStream.Writable.end (C:\Users\xxx\node_modules\concat-stream\node_modules\readable-stream\lib\_stream_writable.js:455:41)
    at DuplexWrapper.onend (C:\Users\xxx\node_modules\readable-stream\lib\_stream_readable.js:504:10)

Any idea on what is wrong here?

@gmsa
Copy link
Contributor

gmsa commented Apr 13, 2017

Fixed by release 1.0.1, created a usage sample project here

@gmsa gmsa closed this as completed Apr 13, 2017
gmsa added a commit that referenced this issue Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants