Unexpected token import
See original GitHub issueHi,
When I try to use your library with SystemJS by importing it like so:
import MaterialDatePicker from 'material-datetime-picker';
or
import MaterialDateTimePicker from 'material-datetime-picker';
I got this error:
Error: (SystemJS) SyntaxError: Unexpected token import
Do you have any idea about where this could come from? Because after looking at the code, I think the README is pointing to the wrong component.
Thanks for your time,
Raphaël
Environment
Browser
- Chrome 51 (Windows, Mac)
Library
- v1.0.1 (via jspm => npm)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17 (8 by maintainers)
Top Results From Across the Web
Node.js - SyntaxError: Unexpected token import - Stack Overflow
Use transpiler like Babel to use import in Nodejs as it is not natively supported in nodejs.There is best alternative of import is...
Read more >Nodejs Uncaught SyntaxError: Unexpected token import
An unexpected token import occurs when an error message appears in the console while running a web application.
Read more >SyntaxError: Unexpected token import in Node.js | bobbyhadz
The "SyntaxError: Unexpected token import" occurs when we use the ES6 import syntax in a version of Node that doesn't support it. To...
Read more >Unexpected token import Node.js - Reactgo
In this tutorial, we are going to learn about how to resolve the unexpected token import error in Node.js.
Read more >Error Unexpected token import in nodejs | Edureka Community
SyntaxError: Unexpected token import at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25) at Object.Module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@orwldn can you share your
.babelrc
? I think by default babel will not compile anything innode_modules
.Fixed in
2.0.0
.