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

action-decorators: TypeError: Cannot read property 'name' of undefined #1

Open
Turbo87 opened this issue Oct 14, 2019 · 1 comment
Open

Comments

@Turbo87
Copy link
Contributor

Turbo87 commented Oct 14, 2019

I tried to run the action-decorators codemod on our codebase but a few files failed with the following error:

TypeError: Cannot read property 'name' of undefined
    at isActionsHash (/private/var/folders/6y/_8qpkt114jzb442txt_9w_2c0000gn/T/jscodeshift119914-33518-jsfuua.4uejq:82:14)
    at Array.find (<anonymous>)
    at NodePath.ast.find.replaceWith.path (/private/var/folders/6y/_8qpkt114jzb442txt_9w_2c0000gn/T/jscodeshift119914-33518-jsfuua.4uejq:10:45)
    at NodePath.<anonymous> (/Users/tbieniek/.config/yarn/global/node_modules/jscodeshift/src/collections/Node.js:144:47)
    at __paths.forEach (/Users/tbieniek/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:77:36)
    at Array.forEach (<anonymous>)
    at Collection.forEach (/Users/tbieniek/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:76:18)
    at Collection.replaceWith (/Users/tbieniek/.config/yarn/global/node_modules/jscodeshift/src/collections/Node.js:142:17)
    at Collection.typedMethod [as replaceWith] (/Users/tbieniek/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:415:43)
    at transformer (/private/var/folders/6y/_8qpkt114jzb442txt_9w_2c0000gn/T/jscodeshift119914-33518-jsfuua.4uejq:9:32)
@lennyburdette
Copy link
Owner

Do you have a code sample I could use to create a test case? My app already uses action decorators so I haven't tested this one thoroughly.

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