'npm install react-bootstrap --save' fails
If you are reporting a bug, please fill in below. Otherwise feel to remove this template entirely.
Description
Following the tutorial to install react-bootstrap, npm install react-bootstrap --save produces the following results:
/Users/dlindberg/Projects/React/create-react-app
├── UNMET PEER DEPENDENCY react@>=0.14.0
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── UNMET PEER DEPENDENCY react@>=0.14.0
│ ├── UNMET PEER DEPENDENCY react-dom@>=0.14.0
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY react@>=0.14.0
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
└── UNMET PEER DEPENDENCY react-dom@>=0.14.0
npm WARN [email protected] requires a peer of react@>=0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@>=0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react@>=0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react@>=0.11.0 but none was installed.
npm WARN [email protected] requires a peer of react@>=0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@>=0.14.0 but none was installed.
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts(if you haven’t ejected):
/Users/dlindberg/Projects/React/create-react-app
├── UNMET PEER DEPENDENCY react@>=0.14.0
└── UNMET PEER DEPENDENCY react-dom@>=0.14.0
npm ERR! peer dep missing: react@>=0.14.0, required by [email protected]
npm ERR! peer dep missing: react-dom@>=0.14.0, required by [email protected]
npm ERR! code 1
node -v:v4.5.0npm -v:3.10.8
Then, specify:
- Operating system: Mac OS 10.11.06 El Cap
- Browser and version: Chrome Version 53.0.2785.116 (64-bit)
Reproducible Demo
See new app that reproduces the issue. Pushed to GitHub and pasted the link here.
https://github.com/DaveLindberg/test-react-bootstrap
Demonstrable issues get fixed faster. Thanks!
I can’t reproduce this on your project. The error message says:
npm WARN [email protected] requires a peer of react@>=0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@>=0.14.0 but none was installed.
This means that react and react-dom for some reason aren’t installed in your project folder even though they are listed in package.json. My guess is that their installation failed for some reason earlier, and so they are missing in your node_modules.
Can you please try:
- Delete
node_modulesin your project - Run
npm install - Try
npm install --save react-bootstrapagain
and report the results?
Thanks.
Thanks for the response.
I completed the 3 steps outlined, and the issue is now resolved. After deleting node_modules, npm install successfully added react and react-dom.
Running npm install bootstrap@3 --save and npm install bootstrap@3 --save was successful.
:-)
Dave Lindberg Marketing & Design 802.282.3368 | DaveLindberg.com | twitter: @DaveLindberg https://twitter.com/DaveLindberg | linkedin: in/DaveLindberg https://www.linkedin.com/in/davelindberg
On Wed, Sep 28, 2016 at 7:45 PM, Dan Abramov [email protected] wrote:
I can’t reproduce this on your project. The error message says:
npm WARN [email protected] requires a peer of react@>=0.14.0 but none was installed. npm WARN [email protected] requires a peer of react-dom@>=0.14.0 but none was installed.
This means that react and react-dom for some reason aren’t installed in your project folder even though they are listed in package.json. My guess is that their installation failed for some reason earlier, and so they are missing in your node_modules.
Can you please try:
- Delete node_modules in your project
- Run npm install
- Try npm install --save react-bootstrap again
and report the results?
Thanks
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/create-react-app/issues/792#issuecomment-250333552, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcsVNmm2_NuVahBuwSa9bStqRIuEBGKks5quvwJgaJpZM4KJXkE .
I’ll close this then. Glad the issue is resolved!