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.

RollUp JS: TypeError: Cannot read property 'inputValue' of undefined

See original GitHub issue

package.json

  "react-select": "^2.4.1",

File CountryPicker.js:

import React, { Component } from 'react';
import Select from 'react-select';

const options: Object = [
   {value: 'chocolate', label: 'Chocolate'},
   {value: 'strawberry', label: 'Strawberry'},
   {value: 'vanilla', label: 'Vanilla'}
];

class CountryPicker extends Component {
   render () {
     return (
       <Select options={options} inputValue={'strawberry'}/>
     );
   }
}

Usage:

class App extends React.Component {
   render () {
       return <CountryPicker/>;
   }
}

// Always starts once doom
document.addEventListener('DOMContentLoaded', () => {
   /** @type {HTMLDivElement} */
   let elm = document.querySelector('div#root');

   // noinspection ES6ModulesDependencies
   ReactDOM.render(<App />, elm);
});

And the rest:

TypeError: Cannot read property 'inputValue' of undefined
    at new StateManager (react-select.esm.js:4559)
    at Yf (react-dom.production.min.js:67)
    at qg (react-dom.production.min.js:92)
    at hi (react-dom.production.min.js:104)
    at Qg (react-dom.production.min.js:144)
    at Rg (react-dom.production.min.js:145)
    at Sc (react-dom.production.min.js:158)
    at Z (react-dom.production.min.js:156)
    at Kc (react-dom.production.min.js:155)
    at ya (react-dom.production.min.js:153)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

4reactions
jportella93commented, May 18, 2020

I’ve solved by downgrading from 3.1.0 to 3.0.8

2reactions
boomdrakcommented, May 14, 2020

I had the same error, and am using Webpack.

TypeError: Cannot read property 'inputValue' of undefined at new StateManager (react-select.esm.js:4559) at Yf (react-dom.production.min.js:67) at qg (react-dom.production.min.js:92) at hi (react-dom.production.min.js:104) at Qg (react-dom.production.min.js:144) at Rg (react-dom.production.min.js:145) at Sc (react-dom.production.min.js:158) at Z (react-dom.production.min.js:156) at Kc (react-dom.production.min.js:155) at ya (react-dom.production.min.js:153)

Solved the issue with installing “memoize-one”: “^5.1.1”,

Current Webpack packages: “webpack”: “4.41.0”, “webpack-cli”: “^3.3.7”, “webpack-dev-server”: “^3.8.0” “react”: “^16.10.1”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Getting "TypeError: Cannot read properties of null ...
I created a personal library (UI library / style guide) to standardize the components of my application. Everything was working perfectly ...
Read more >
jest typeerror: cannot read properties of null (reading 'usestate')
I am building a little local dev/testing/documentation environment for some components which are used across different projects and so want to create them ......
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
But Rollup doesn't — it'll only bring in what we're actually using. ... we set an exclude config property to ignore the node_modules...
Read more >
Input value is showing undefined (reading 'value') while using ...
Coding example for the question Input value is showing undefined (reading 'value') while using rsuite library-Reactjs.
Read more >
npm terser, error from terser invalid assignment, unexpected ...
It all started with an error message during the build: 'ERROR in bundle.xxx.js from Terser'. TypeError: Cannot read property 'properties' of undefined If ......
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