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

Awaiting upstream PR - fix for jscodeshift when path is undefined #20

Closed
snewcomer opened this issue Jul 23, 2019 · 5 comments
Closed

Comments

@snewcomer
Copy link
Contributor

facebook/jscodeshift#334

(node:84942) UnhandledPromiseRejectionWarning: TypeError: array is not iterable
@snewcomer
Copy link
Contributor Author

One option is we can use fs.lstatSync on our side to filter out those paths that don't exist in the user's project. What do you think?

@dcyriller
Copy link
Member

It’s a good idea!

@snewcomer
Copy link
Contributor Author

Anybody that is coming across this - you can hop into here and update this array to just app if you are running this on your project.

@dcyriller
Copy link
Member

You can also pass app as an arg: npx github:ember-codemods/ember-data-codemod app, it will bypass the array / work around the bug.

@dcyriller
Copy link
Member

dcyriller commented Nov 19, 2019

Here, we have switched to using codemod-cli: #30

Switching to codemod-cli, we've made passing a path to the codemod required. So the path is no longer undefined and this issue should be gone now.

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