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

Unexpected token export #52

Open
Geczy opened this issue Jun 15, 2018 · 1 comment
Open

Unexpected token export #52

Geczy opened this issue Jun 15, 2018 · 1 comment

Comments

@Geczy
Copy link

Geczy commented Jun 15, 2018

jscodeshift -t node_modules/5to6-codemod/transforms/amd.js src

Result:

    export default _;
    ^^^^^^

SyntaxError: Unexpected token export
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Module._extensions..js (module.js:663:10)
    at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Matt\AppData\Local\Yarn\config\global\node_modules\babel-regist
er\lib\node.js:152:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
All done.
Results:
0 errors
0 unmodified
0 skipped
0 ok
Time elapsed: 1.729seconds

Node v8.11

@xjamundx
Copy link
Contributor

I guess we don't have support for ES modules. Should be fairly easy to add, but I unfortunately don't have the time to add it. Will require an updated parser.

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