Skip to content

Import error #68

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

Closed
macnaughton opened this issue May 24, 2022 · 1 comment · Fixed by #69
Closed

Import error #68

macnaughton opened this issue May 24, 2022 · 1 comment · Fixed by #69
Labels
bug Something isn't working

Comments

@macnaughton
Copy link

macnaughton commented May 24, 2022

I received the following error when running the codemod:

/Users/..../..../node_modules/types-react-codemod/transforms/preset-18.js:1
import contextAnyTransform from "./context-any";
^^^^^^

SyntaxError: Cannot use import statement outside a module

Command run was npx types-react-codemod preset-18 ./src

This is using nodejs 16.

FYI, Downgrading to 1.1.0 resolved it. Maybe related to #63 since the import in question is preset-18

@eps1lon eps1lon added the bug Something isn't working label May 24, 2022
@zachhardesty7
Copy link

Can confirm I experienced the same thing with Node v12 & v16 and running 1.1.0 worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants