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

error coming from AutoresizeInput dependency #1694

Closed
mac-s-g opened this issue Apr 30, 2017 · 11 comments
Closed

error coming from AutoresizeInput dependency #1694

mac-s-g opened this issue Apr 30, 2017 · 11 comments

Comments

@mac-s-g
Copy link

mac-s-g commented Apr 30, 2017

Problem Description

The react-input-autosize dependency is throwing an error when React-Select is imported.

Here is the error:

ERROR in ./~/react-input-autosize/lib/AutosizeInput.js
Module not found: Error: Can't resolve 'create-react-class' in '/react/node_modules/react-input-autosize/lib'
 @ ./~/react-input-autosize/lib/AutosizeInput.js 7:18-47
 @ ./~/react-select/lib/Select.js

Cause

It looks like a patch version of react-input-autosize was published today. The changes are causing the error above.

Here is how react-input-autosize is currently included with react-select:

"react-input-autosize": "^1.1.0"
see: https://github.com/JedWatson/react-select/blob/master/package.json#L15

Quick Fix

You can quickly fix the issue by removing the carrot from your dependency version:

Replace the line linked above with:
"react-input-autosize": "1.1.0"

I fixed the error in my project by explicitly adding "react-input-autosize": "1.1.0" as a dependency to my project.

I hope this is helpful, I ❤️ your component!

@dandonahoe
Copy link

Related with additional information about a fix:

JedWatson/react-input-autosize#84

stacey-gammon added a commit to stacey-gammon/kibana that referenced this issue May 1, 2017
stacey-gammon added a commit to stacey-gammon/kibana that referenced this issue May 1, 2017
stacey-gammon added a commit to elastic/kibana that referenced this issue May 1, 2017
* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess
stacey-gammon added a commit to stacey-gammon/kibana that referenced this issue May 1, 2017
* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess
stacey-gammon added a commit to elastic/kibana that referenced this issue May 1, 2017
* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess
stacey-gammon added a commit to stacey-gammon/kibana that referenced this issue May 1, 2017
* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess
@castrolem
Copy link

So, it's not fixed fixed yet right?

stacey-gammon added a commit to elastic/kibana that referenced this issue May 1, 2017
* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess
@mooncakelmn
Copy link

Seems not fixed yet, set it to fixed version for now as well...

PLobo87 pushed a commit to AdmiralCloud/react-select that referenced this issue May 2, 2017
A quick fix to solve the current error which `the react-input-autosize` dependency is throwing when React-Select is imported.
JedWatson#1694
WarisR added a commit to WarisR/react-select that referenced this issue May 2, 2017
Quick fix: replace a version of 'react-input-autosize' from '^1.1.0' to '1.1.0'.
@baijifeilong
Copy link

"react-input-autosize": "1.1.0" did not work for me
"create-react-class": "^15.5.2" worked for me

@malikimprowised
Copy link

malikimprowised commented May 8, 2017

@baijifeilong I just faced this problem. Please add
react-input-autosize": "1.1.0 this line to package.json of your project. It seems that newer version of react-input-autosize cause the error.

@lauterry
Copy link

Hi

Moving to react-select 1.0.0-rc.4 had fixed the issue.

Please close this issue if so.

Best regards.

@dandonahoe
Copy link

Verified, works. Thanks!

@agirton
Copy link
Collaborator

agirton commented May 19, 2017

This has been fixed with the latest release, closing.

@agirton agirton closed this as completed May 19, 2017
stacey-gammon added a commit to elastic/kibana that referenced this issue Jun 2, 2017
* Fix for react-input-autosize bug (#11543)

* Fix for react-select bug

Description of the issue here:
JedWatson/react-select#1694

* Can't put comments in package.json I guess

* Update dashboard based on url changes (#12123)

* Update dashboard based on url changes

* make clickSelector a retry in case it fails the first time

# Conflicts:
#	src/core_plugins/kibana/public/dashboard/dashboard.js
#	test/functional/apps/dashboard/_dashboard.js
@peebles
Copy link

peebles commented Sep 9, 2017

> react-scripts build

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/react-select/lib/Select.js:39 

I am using:

# grep react-select package.json 
    "react-select": "^1.0.0-rc.5",

LIne #39:

var _reactInputAutosize2 = _interopRequireDefault(_reactInputAutosize);

@peebles
Copy link

peebles commented Sep 9, 2017

I should note however, that ^1.0.0-rc5 actually installed 1.0.0-rc6. If I back off to 1.0.0-rc5, then the build (from create-react-app) succeeds without an error.

@srigowrideo
Copy link

hello everyone !! i am not able to open any program on visual studio code ,i am getting textual examination and it contains junk data so what to do and how to proceed further this code is a react code

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

10 participants