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

Couldn't resolve parser "tsx" #357

Closed
lifeiscontent opened this issue Jan 8, 2020 · 3 comments
Closed

Couldn't resolve parser "tsx" #357

lifeiscontent opened this issue Jan 8, 2020 · 3 comments

Comments

@lifeiscontent
Copy link

Hi there, when I'm trying to use the tsx parser with a codemod I get the error Error: Couldn't resolve parser "tsx" any ideas why?

@mbylstra
Copy link

I had the same problem with the @storybook/codemod storiesof-to-csf.js transform. I discovered that this error was coming from prettier, which the storiesof-to-csf.js transform was using. What I ended up doing was removing the prettier command from the storiesof-to-csf.js in my node_modules directory, and then just running prettier manually (it was a hack)

Were you also seeing this from @storybook/codemod? If so, I don't think it's an issue with jscodeshift, but rather @storybook/codemod.

@lifeiscontent
Copy link
Author

@mbylstra thanks for digging into this, that was exactly my issue! Thank you.

@mbylstra
Copy link

It turned out that with my hacky fix, although it was running without errors, it wasn't actually transforming the code. I've left an issue here: storybookjs/storybook#9669. This issue should be closed - it's not an issue with jscodeshift.

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