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

b.functionExpression.from(functionDeclaration) is failing on Windows #1170

Open
MichaelDeBoey opened this issue Aug 20, 2022 · 1 comment
Open

Comments

@MichaelDeBoey
Copy link

When we got this problem in the remix repo (remix-run/remix#3987), I reported this in the jscodeshift repo (facebook/jscodeshift#520), but since all their builders are coming from recast, I thought it would be a good idea to also report it in this repo

For some reason Windows is throwing an error when converting a FunctionDeclaration to a FunctionExpression, while this is perfectly working (as expected) on Linux.

As @mcansh pointed out in remix-run/remix#3987 (comment), the origin of this problem is coming from ast-types
https://github.com/benjamn/ast-types/blob/master/lib/types.ts#L656-L658

AST Explorer example (which is failing as well): https://astexplorer.net/#/gist/31f7305e1a29c0565f6efb13709e93a8/latest

@MichaelDeBoey
Copy link
Author

@benjamn If you can point me into the right direction, I would be happy to create a PR to fix this.

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

1 participant