reactstrap icon indicating copy to clipboard operation
reactstrap copied to clipboard

Can't resolve 'reactstrap' when using github master branch

Open buncis opened this issue 8 years ago • 4 comments

Issue description

  • components: reactstrap
  • reactstrap version #master
  • import method umd/csj/es
  • react version #16.3.2
  • bootstrap version #4.1.1

What is happening?

Module not found: Can't resolve 'reactstrap' when using github master branch

What should be happening?

should not error just like the released version

Steps to reproduce issue

  1. create-react-app
  2. yarn add https://github.com/reactstrap/reactstrap.git#master
  3. call any component from reactstrap

Error message in console

Failed to compile.

./src/App.js
Module not found: Can't resolve 'reactstrap' in '/home/user/reactstrapbeta/src'

buncis avatar May 23 '18 07:05 buncis

If you add from github, you only have src files. You must "build" dist files from src files in order to use it.

locpd avatar May 23 '18 14:05 locpd

This is correct, reactstrap doesn't check in dist files. You can either build the dist or reference the /src/index directly and instruct your build/bundling tool to babel the contents of it (not 100% sure if that last thing will work, but it seems like it would based on how some other component libraries get away with not having a dist at all)

TheSharpieOne avatar May 23 '18 18:05 TheSharpieOne

npm install --save reactstrap react react-dom

Samiys avatar Jun 18 '19 18:06 Samiys

Thank you, it helped me npm install --save reactstrap react react-dom

Nguyenau avatar Jul 01 '20 02:07 Nguyenau