Set up Bootstrap

From @jayair on Tue Jul 11 2017 17:20:21 GMT+0000 (UTC)

@RaeMarvin Ah I see. Thanks a lot for reporting back.

From @bharloe on Wed Aug 02 2017 20:17:51 GMT+0000 (UTC)

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 prop-types-extra@1.0.1 requires a peer of react@>=0.14.0 but none was installed.
npm WARN react-bootstrap@0.31.2 requires a peer of react@^0.14.9 || >=15.3.0 but none was installed.
npm WARN react-bootstrap@0.31.2 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none was installed.
npm WARN react-overlays@0.7.0 requires a peer of react@^0.14.9 || >=15.3.0 but none was installed.
npm WARN react-overlays@0.7.0 requires a peer of react-dom@^0.14.9 || >=15.3.0 but none was installed.
npm WARN react-prop-types@0.4.0 requires a peer of react@>=0.14.0 but none was installed.
npm WARN uncontrollable@4.1.0 requires a peer of react@>=0.11.0 but none was installed.
npm WARN notes-app-api@1.0.0 No description
npm WARN notes-app-api@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: 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
notes-app-api@1.0.0 /mnt/c/Users/Ben/Desktop/notes-app-api
β”œβ”€β”€ aws-sdk@2.94.0
β”œβ”€β”€ babel-core@6.25.0
β”œβ”€β”€ babel-loader@7.1.1
β”œβ”€β”€ babel-plugin-transform-runtime@6.23.0
β”œβ”€β”€ babel-preset-es2015@6.24.1
β”œβ”€β”€ babel-preset-stage-3@6.24.1
β”œβ”€β”€ babel-runtime@6.25.0
β”œβ”€β”€ glob@7.1.2
β”œβ”€β”€ UNMET PEER DEPENDENCY react@^0.14.9 || >=15.3.0
β”œβ”€β”€ react-bootstrap@0.31.2
β”œβ”€β”€ UNMET PEER DEPENDENCY react-dom@^0.14.9 || >=15.3.0
β”œβ”€β”€ serverless-webpack@2.2.0
β”œβ”€β”€ uuid@3.1.0
β”œβ”€β”€ webpack@3.4.1
└── webpack-node-externals@1.6.0

npm ERR! peer dep missing: react@^0.14.9 || >=15.3.0, required by react-bootstrap@0.31.2
npm ERR! peer dep missing: react-dom@^0.14.9 || >=15.3.0, required by react-bootstrap@0.31.2
npm ERR! peer dep missing: react@>=0.14.0, required by prop-types-extra@1.0.1
npm ERR! peer dep missing: react@^0.14.9 || >=15.3.0, required by react-overlays@0.7.0
npm ERR! peer dep missing: react@>=0.14.0, required by react-prop-types@0.4.0
npm ERR! peer dep missing: react@>=0.11.0, required by uncontrollable@4.1.0
npm ERR! peer dep missing: react-dom@^0.14.9 || >=15.3.0, required by react-overlays@0.7.0
npm ERR! peer dep missing: react@>=0.14.0, required by react-prop-types@0.4.0

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?

From @bharloe on Wed Aug 02 2017 21:39:47 GMT+0000 (UTC)

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.

From @jayair on Wed Aug 02 2017 22:24:59 GMT+0000 (UTC)

@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.

From @bharloe on Wed Aug 02 2017 22:31:41 GMT+0000 (UTC)

That explains it, thanks!

There are issues with the latest version of react-bootstrap (0.32.2)
No issue when I roll back to version 0.31.5
:
Failed to compile

./node_modules/react-bootstrap/es/DropdownMenu.jsModule not found: Can't resolve '@babel/runtime/core-js/array/from' in '[...]/node_modules/react-bootstrap/es'

This error occurred during the build time and cannot be dismissed.

1 Like

Oh thanks for pointing it out. Hopefully they fixed it with 0.32.3.

indeed.
fixed in 0.32.3

Linked issues :

1 Like

Good to hear! Thanks for reporting back.