react-bootstrap-typescript icon indicating copy to clipboard operation
react-bootstrap-typescript copied to clipboard

tds points to react-bootstrap/src instead of react-bootstrap/lib

Open diegolaciar opened this issue 8 years ago • 3 comments

I get this err:

Module not found: Error: Cannot resolve module 'react-bootstrap/src/Button'

The path of the lib is node_modules/react-bootstrap/lib/Button

I'm doing something wrong or TSD need to be updated ?

Regards,

diegolaciar avatar Dec 28 '16 20:12 diegolaciar

Hi, sorry I was on a little vacation from my github, I don't know why you are getting this error, perhaps you can tell me a bit about your setup, how you installed react-bootstrap and react-bootstrap-typescript.

as much info as possible would be useful, thanks!

christhomas avatar Mar 07 '17 13:03 christhomas

@christhomas To reduce size of app, instead of doing import Button from 'react-bootstrap' we can do import Button from 'react-bootstrap/lib/Button'. But the TSD are made using react-bootstrap/src/Button so error pops out Module not found: Error: Cannot resolve module 'react-bootstrap/src/Button'.

Now on installing 'react-bootstrap' there is no src folder in node_modules/react-bootstrap so it says Module not found. So changing react-bootstrap/src to react-bootstrap/lib does the job. Do you want me to make a pull request for this?

iamsaksham avatar Apr 08 '17 08:04 iamsaksham

yes, please make a pull request, thanks!

christhomas avatar Apr 11 '17 12:04 christhomas