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

Cannot read property 'name' of undefined #24

Open
wataru358 opened this issue Feb 23, 2018 · 6 comments
Open

Cannot read property 'name' of undefined #24

wataru358 opened this issue Feb 23, 2018 · 6 comments

Comments

@wataru358
Copy link

Hi,
Using 4.2.0 with [email protected] gave us following issue on our webpack build.
Noticed when I do clean npm install yesterday.
Using 4.1.0 won't cause any issue.
Any insight on this...?

webpack build error
`
ERROR in ./src/utils/xxxx.js
Module build failed: TypeError: /Users/myuser/myproject/src/utils/myreactcomponent.js: Cannot read property 'name' of undefined
at DestructuringTransformer.pushObjectProperty (/Users/myuser/myproject/node_modules/babel-plugin-extensible-destructuring/lib/index.js:209:96)
at DestructuringTransformer.pushObjectPattern (/Users/myuser/myproject/node_modules/babel-plugin-extensible-destructuring/lib/index.js:251:18)
at DestructuringTransformer.push (/Users/myuser/myproject/node_modules/babel-plugin-extensible-destructuring/lib/index.js:156:16)
at DestructuringTransformer.init (/Users/myuser/myproject/node_modules/babel-plugin-extensible-destructuring/lib/index.js:417:14)
at PluginPass.VariableDeclaration (/Users/myuser/myproject/node_modules/babel-plugin-extensible-destructuring/lib/index.js:639:27)
at newFn (/Users/myuser/myproject/node_modules/babel-traverse/lib/visitors.js:276:21)
at NodePath._call (/Users/myuser/myproject/node_modules/babel-traverse/lib/path/context.js:76:18)
at NodePath.call (/Users/myuser/myproject/node_modules/babel-traverse/lib/path/context.js:48:17)
at NodePath.visit (/Users/myuser/myproject/node_modules/babel-traverse/lib/path/context.js:105:12)
at TraversalContext.visitQueue (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitMultiple (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:103:17)
at TraversalContext.visit (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:190:19)
at Function.traverse.node (/Users/myuser/myproject/node_modules/babel-traverse/lib/index.js:114:17)
at NodePath.visit (/Users/myuser/myproject/node_modules/babel-traverse/lib/path/context.js:115:19)
at TraversalContext.visitQueue (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:150:16)
at TraversalContext.visitSingle (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:108:19)
at TraversalContext.visit (/Users/myuser/myproject/node_modules/babel-traverse/lib/context.js:192:19)
at Function.traverse.node (/Users/myuser/myproject/node_modules/babel-traverse/lib/index.js:114:17)
...

`

@hovik-geodakyan
Copy link

hovik-geodakyan commented Feb 24, 2018

Facing the same error on a new create-react-app project. Haven't yet found anything to add to the discussion though.

@hleumas
Copy link
Contributor

hleumas commented Feb 25, 2018

Thank you folks, seems related to #22

@palnes
Copy link
Contributor

palnes commented Aug 1, 2018

Aye, it is. Sorry about the long hiatus, hopefully I didn't ruin all y'all workdays. I have posted a new PR, #26 , that looks at the version number instead of testing for existence of the deprecated function. The problem being it's still there and just throwing stack traces.

I've managed to build my own project (3k+ modules) with both Webpack 3/Babel 6, and Webpack 4/Babel 7.

Just a sidenote, this plugin replaces babel/plugin-transform-destructuring, the two should probably not be used at the same time.

Again, sorry about last time.

@palnes
Copy link
Contributor

palnes commented Aug 22, 2018

@wataru358 Has this been resolved by the latest version?

@hovik-geodakyan
Copy link

@palnes Workes like a charm. Thank you.

@palnes
Copy link
Contributor

palnes commented Jan 21, 2019

This should probably be closed. :)

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

4 participants