Link to chapter - http://serverless-stack.com/chapters/setup-bootstrap.html
When I try to install bootstrap it's giving me an 'unmet peer dependency' error.

Did I miss an install somewhere?
Hmm.. It seems like React wasn't setup properly. You can try clearing out your NPM cache and retry installing it.
$ rm -rf node_modules/
$ npm cache clean
And then try installing it again
$ npm install
Hi,
Thanks for sharing the example
On running the command
npm install react-bootstrap --save
I get the following
[..................] - rollbackFailedOptional: verb npm-session e5796588f62c74b
[..................] - rollbackFailedOptional: verb npm-session e5796588f62c74b
Can you point me to why this is occurring please.
Cheers
@RaeMarvin That's pretty odd. Can you run these two commands and tell me what it returns npm -v and node -v?
@jayair I get the following
$ npm -v
5.0.3
$ node -v
v8.1.2
@RaeMarvin Thanks, that looks good to me. I'm personally on Node v7.10.0.
But from looking around some other people are facing this as well - https://github.com/npm/npm/issues/17246
@jayair Thanks for confirming that my setup looks good and linking into the issues raised.
It's such a shame as I really want to code through your post and see it working
@RaeMarvin I think something is wrong with NPM. Have you tried installing any other package?
@jayair This is my first time using npm (total newbie) so if it's not in your paper then the answer is no.
@jayair
Just checked and I installed Babel and Webpack
$ npm install --save-dev \
babel-core \
babel-loader \
babel-plugin-transform-runtime \
babel-preset-es2015 \
babel-preset-stage-3 \
serverless-webpack \
glob \
webpack \
webpack-node-externals
$ npm install --save babel-runtime
@RaeMarvin Those worked fine for you?
@jayair Yes that's the strange thing
@RaeMarvin Not sure if you've tried clearing the npm cache npm cache clean. It might help.
@jayair I've tried that but the issue still exists.
@RaeMarvin That's pretty annoying. I'll try and look for what other folks are doing.
Replace $ npm install react-bootstrap --save with $ yarn add react-bootstrp - worked for me... Looks like create-react-app now uses yarn vs npm!
Note: you do not need to append the --save portion when using Yarn, as it saves automatically.
For those interested... the following link to Andrew Mead's video about Yarn vs NPM does an excellent job explaining the difference(s)!
@jomazu That's a good idea! It should fix @RaeMarvin's issue. Yarn is pretty much drop in replacement for NPM.
@jayair
All sorted 👍
After speaking with NPM support this is not an error message but just one of the messages that are displayed when running the install command.
The issue is that it was stalling at that point.
What I did next was to let the command keep running (or stalling for a few more minutes) and as expected the true error message was displayed.
npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
I found a link that resolved this issue.
https://stackoverflow.com/questions/18419144/npm-not-working-read-econnreset
Basically I needed to run the below commands to set p the proxy.
npm config set registry http://registry.npmjs.org/
And then re-run the install.
I'll keep using npm to complete your example but (@jomazu thanks for YARN mention) I will investigate using YARN also.
Cheers All
@RaeMarvin Ah I see. Thanks a lot for reporting back.
Hi @jayair. I am getting a similar problem to the first comment in this thread, but unfortunately suggestions above haven't worked for me. Here is the error when i install:
npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
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.14.9 || >=15.3.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.9 || >=15.3.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.9 || >=15.3.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.9 || >=15.3.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] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current
: {"os":"linux","arch":"x64"})
Also after trying the suggestions in this thread I'm now getting a package-lock.json, not sure what that's about.
Here is the error when I list my modules:
ben@BensLaptop:/mnt/c/Users/Ben/Desktop/notes-app-api$ npm list --depth=0
[email protected] /mnt/c/Users/Ben/Desktop/notes-app-api
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY react@^0.14.9 || >=15.3.0
├── [email protected]
├── UNMET PEER DEPENDENCY react-dom@^0.14.9 || >=15.3.0
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
npm ERR! peer dep missing: react@^0.14.9 || >=15.3.0, required by [email protected]
npm ERR! peer dep missing: react-dom@^0.14.9 || >=15.3.0, required by [email protected]
npm ERR! peer dep missing: react@>=0.14.0, required by [email protected]
npm ERR! peer dep missing: react@^0.14.9 || >=15.3.0, required by [email protected]
npm ERR! peer dep missing: react@>=0.14.0, required by [email protected]
npm ERR! peer dep missing: react@>=0.11.0, required by [email protected]
npm ERR! peer dep missing: react-dom@^0.14.9 || >=15.3.0, required by [email protected]
npm ERR! peer dep missing: react@>=0.14.0, required by [email protected]
My node is version 6.11.2, my npm is version 5.3.0, and my react is version 15.6.1. Do you have any ideas of what I'm doing wrong here?
The issue was that I was still in the notes-API working directory, I missed the instruction that said to make a separate directory for the react front end, and had instead made a folder within the notes-API working directory. I was running the install bootstrap command in the API working directory instead of the react app directory when I got the error above. I'm still not sure what's up with the package-lock.json files, does anyone know why I'm getting those? I think it has to do with updating npm and node.
@bharloe Yeah the package-lock.json is now something that npm generates. You can commit that to source control. It was a part of their big 5.0 update.
That explains it, thanks!
This issue was moved to https://discourse.serverless-stack.com/t/comments-set-up-bootstrap/118
Most helpful comment
Hmm.. It seems like React wasn't setup properly. You can try clearing out your NPM cache and retry installing it.
And then try installing it again