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

ParseError: 'import' and 'export' may appear only with 'sourceType: module' #1

Closed
ericntd-legacy opened this issue Dec 8, 2015 · 3 comments

Comments

@ericntd-legacy
Copy link

I'm using babelify 6.4.0 and browserify 12.0.1

[19:19:16] Browserify Error 
/Users/eric/af/frontend_app/node_modules/react-numeric-input/src/NumericInput.jsx:1
import { PropTypes, Component } from 'react';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
@vlad-ignatov
Copy link
Owner

This should be a matter of build configuration. It is a parse error which means that the expression is not recognised (imports not supported). Did you include the necessary presets for es6 and react?

Maybe this can help you: babel/babelify#103

@vlad-ignatov
Copy link
Owner

Any development on this one?

@ericntd-legacy
Copy link
Author

I realised that your library depends on React 0.14 while I'm still using 0.13 so I've decided to go with another solution, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants