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

TypeError: Cannot read property 'string' of undefined #126

Open
techuila opened this issue Nov 5, 2019 · 3 comments
Open

TypeError: Cannot read property 'string' of undefined #126

techuila opened this issue Nov 5, 2019 · 3 comments

Comments

@techuila
Copy link

techuila commented Nov 5, 2019

TypeError: Cannot read property 'string' of undefined
./node_modules/react-input-autosize/lib/AutosizeInput.js
node_modules/react-input-autosize/lib/AutosizeInput.js:31
28 | var AutosizeInput = React.createClass({
29 | displayName: 'AutosizeInput',
30 | propTypes: {

31 | className: React.PropTypes.string,
32 | // className for the outer element
33 | defaultValue: React.PropTypes.any,
34 | // default field value

@flora8984461
Copy link

Same for me when using import { AsyncCreatable } from "react-select-plus";

evaluate
https://fqqlk.csb.app/node_modules/react-input-autosize/1.1.0/lib/AutosizeInput.js:13:30
z
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:98419
X.evaluate
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:110543
ye.evaluateTranspiledModule
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:120123
c
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:110289
evaluate
https://fqqlk.csb.app/node_modules/react-select-plus/lib/Select.js:29:27
z
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:98419
X.evaluate
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:110543
ye.evaluateTranspiledModule
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:120123
c
https://codesandbox.io/static/js/sandbox.5a7ff733c.js:1:110289
evaluate
/CompaniesSelectField.js:2
  1 | import React, { useState } from "react";
> 2 | import { AsyncCreatable } from "react-select-plus";
  3 | // import AsyncCreatable from "react-select/async-creatable";
  4 | 
  5 | export function CompaniesSelectField(props) {
View compiled

@CygnusBell
Copy link

Same issue when importing "Select" or "Creatable"

@urlund
Copy link

urlund commented May 26, 2021

This happens because react-select-plus uses an old build of react-input-autosize.

Both builds depends on React.PropTypes which is deprecated as of React v15.5.

Please update react-select-plus to use the prop-types library instead, and update the react-input-autosize dependency to a more resent build (that has already been updated to use prop-types library).

UPDATE

I just realized this only happens if you use the npm package, because it's not updated with the current github version (so the real request here would be to update the npm package :)

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