question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'name' of undefined

See original GitHub issue

Hi, Using 4.2.0 with babel-core@6.26.0 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) …

`

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hovik-geodakyancommented, Aug 22, 2018

@palnes Workes like a charm. Thank you.

0reactions
palnescommented, Jan 21, 2019

This should probably be closed. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'name' of undefined
This type of error mean that your container variable file is not defined. You should use console.log at different places to see what...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property 'name' of undefined
It is a very common error when working with object and array to get a TypeError: Cannot read property 'name' of undefined ....
Read more >
TypeError: Cannot read property 'name' of undefined, why is ...
Our Person constructor var Person = function(name, age){ this.name = name; ... TypeError: Cannot read property 'name' of undefined, why is this?
Read more >
Cannot read property 'name' of undefined' mean? - Quora
Usually it means you misspelled a variable name, or forgot to declare a variable, or it is out of scope.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found