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.

TypeError: Cannot read property 'name' of undefined

See original GitHub issue

What in the world am I doing wrong to cause this to be undefined? https://github.com/form-data/form-data/blob/03444d21961a7a44cdc2eae11ee3630f6969023d/lib/form_data.js#L217

I’m assuming it is referring to value

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

100reactions
jordpocommented, May 12, 2017

What I noticed is that the issue comes up if any of the properties that you are setting on the form data has a value of undefined. Guarding against that fixed the issue for me.

20reactions
MarkHerholdcommented, Apr 7, 2017

I think you need to use form instead of formData as the object key. I ran into this using the request-promise module and am guessing the same happened to you.

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 >
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 >
Cannot read property 'name' of undefined, at Array.forEach
TypeError : Cannot read property 'name' of undefined, at Array.forEach ... When I press the button to display the task pane, I am...
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