I am trying to install react-bootstrap. When I run the command
npm install react-bootstrap --save
I get the following (some path names replaced with '...') :
npm WARN saveError ENOENT: no such file or directory, open '/Users/../package.json'/Users/.../..
├── 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 enoent ENOENT: no such file or directory, open '/Users/../../package.json'
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-dom@>=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.
Do I need to install React before I install react-bootstrap? I don't see any specific mention of it in the doc. (I am new to React and didn't even know that I need React also if I am using react-bootstrap. I thought it included React as well. But saw this mentioned in the Javascript section of the same doc later: "If you have React setup and React-Bootstrap installed you have everything you need.")
In the React ecosystem, you should always install
react
+react-dom
first. Don't rely on peer dependencies in general.