react-input-autosize: Missing dependencies for `create-react-class` and `prop-types`

Hey, My build is failing because of a recent update of this library.

Log -

Error: Cannot find module 'create-react-class'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function._resolveFilename (/home/uv/dev/t2k-js-common/node_modules/mocha-webpack/lib/util/registerRequireHook.js:42:34)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/uv/dev/t2k-js-common/node_modules/react-input-autosize/lib/AutosizeInput.js:7:19)
    at Module._compile (module.js:571:32)
    at Module._extensions..js (module.js:580:10)
...

Seems like you added usage to a library but forgot to add it to dependency\peer dependency. Thanks in advance.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 62
  • Comments: 19 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Sigh you broke the internet

Temporary fix:

npm install --save react-input-autosize@1.1.0

@unimonkiez Related temporary fix is doing the following:

Install that module manually npm install create-react-class

Then somewhere in your code, add: require('create-react-class');

This was driving me insane yesterday after installing react-select and having everything explode. As a freak accident, I came across this and figured it out:

https://facebook.github.io/react/docs/react-without-es6.html

@mAiNiNfEcTiOn This is definitely nuking projects all over the place.

If it’s any help, here’s the output of the error:

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

So, somebody added a new dependency without bumping the major version number and broke semver?

some people just want to watch the world burn.

TypeError: Cannot read property ‘string’ of undefined ./node_modules/react-select-plus/node_modules/react-input-autosize/lib/AutosizeInput.js D:/react/build/node_modules/react-select-plus/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 View compiled

#85 fixes this

This error can be temporarily fixed by adding create-react-class npm i --save create-react-class

  • 1 for this, breaking my apps as well

Amazing this hasn’t been fixed yet. @JedWatson are you on holidays?