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

Parse Error with ES6 importing? #25

Open
rezaali opened this issue Mar 27, 2017 · 4 comments
Open

Parse Error with ES6 importing? #25

rezaali opened this issue Mar 27, 2017 · 4 comments

Comments

@rezaali
Copy link

rezaali commented Mar 27, 2017

ParseError: 'import' and 'export' may appear only with 'sourceType: module'
line 16
***/node_modules/ray-input/src/ray-input.js
import OrientationArmModel from './orientation-arm-model'
^

@rezaali
Copy link
Author

rezaali commented Mar 27, 2017

any ideas on why ray-input isn't importing ?

@toji
Copy link

toji commented Apr 24, 2017

I'm seeing this as well, while other similar libraries (like webvr-ui) are importing fine. It's not obvious to me what the difference is. :(

@hapticdata
Copy link
Collaborator

I believe this is because we specify our browserify transforms in the package.json like so in replacement of our npm script calling browserify including any transforms.
Otherwise my understanding is your parent project's transforms won't apply to node_modules/

@toji
Copy link

toji commented Apr 24, 2017

For what it's worth I have that in my own code, and I've tried pasting that into this repo's package.json as well but it didn't help. Renaming the main file to src/index.js instead of src/ray-input.js, though, DID fix it, because Javascript toolchains are magical in the worst way. 😡

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

3 participants