admin管理员组

文章数量:1023221

How can I fix this issue?

After piling this error shows:

Module not found: Can't resolve 'react-bootstrap/Panel' in 'F:\CFC\aaa\src\ponents\Login'

How can I fix this issue?

After piling this error shows:

Module not found: Can't resolve 'react-bootstrap/Panel' in 'F:\CFC\aaa\src\ponents\Login'

Share Improve this question edited Mar 7, 2019 at 11:35 Marcel Burkhard 3,5232 gold badges31 silver badges35 bronze badges asked Mar 7, 2019 at 10:55 Taimoor HassanTaimoor Hassan 211 silver badge2 bronze badges 5
  • did you do npm install react-bootstrap --save? – Avanthika Commented Mar 7, 2019 at 10:56
  • Make sure this module is installed linked correctly. npm link [module-name] – node_modules Commented Mar 7, 2019 at 10:56
  • npm install react-bootstrap --save yes i did this but not working – Taimoor Hassan Commented Mar 7, 2019 at 11:07
  • can you elaborate – Taimoor Hassan Commented Mar 7, 2019 at 11:09
  • Where is the error ing from? TypeScript? Webpack? Please provide more info ! – Amit Commented Mar 7, 2019 at 11:59
Add a ment  | 

3 Answers 3

Reset to default 3

npm install --save bootstrap react-bootstrap

It works for me.

According to the react-bootstrap documentation when migrating to Bootstrap 4, Panel was replaced by Card.

For me, the Accordion ponent from Bootstrap 5. was more suited to what I wanted to do.

I would like also to guess your issue. react-bootstrap package has a Panel ponent only until v0.33.1 version - later versions does not have such ponent. So make sure you installed correct version like npm i -S [email protected]

Also another problem could be also the reason in later versions Instead of importing default like

import Button from 'react-bootstrap/Button';

I would suggest you try

import { Button } from 'react-bootstrap';

How can I fix this issue?

After piling this error shows:

Module not found: Can't resolve 'react-bootstrap/Panel' in 'F:\CFC\aaa\src\ponents\Login'

How can I fix this issue?

After piling this error shows:

Module not found: Can't resolve 'react-bootstrap/Panel' in 'F:\CFC\aaa\src\ponents\Login'

Share Improve this question edited Mar 7, 2019 at 11:35 Marcel Burkhard 3,5232 gold badges31 silver badges35 bronze badges asked Mar 7, 2019 at 10:55 Taimoor HassanTaimoor Hassan 211 silver badge2 bronze badges 5
  • did you do npm install react-bootstrap --save? – Avanthika Commented Mar 7, 2019 at 10:56
  • Make sure this module is installed linked correctly. npm link [module-name] – node_modules Commented Mar 7, 2019 at 10:56
  • npm install react-bootstrap --save yes i did this but not working – Taimoor Hassan Commented Mar 7, 2019 at 11:07
  • can you elaborate – Taimoor Hassan Commented Mar 7, 2019 at 11:09
  • Where is the error ing from? TypeScript? Webpack? Please provide more info ! – Amit Commented Mar 7, 2019 at 11:59
Add a ment  | 

3 Answers 3

Reset to default 3

npm install --save bootstrap react-bootstrap

It works for me.

According to the react-bootstrap documentation when migrating to Bootstrap 4, Panel was replaced by Card.

For me, the Accordion ponent from Bootstrap 5. was more suited to what I wanted to do.

I would like also to guess your issue. react-bootstrap package has a Panel ponent only until v0.33.1 version - later versions does not have such ponent. So make sure you installed correct version like npm i -S [email protected]

Also another problem could be also the reason in later versions Instead of importing default like

import Button from 'react-bootstrap/Button';

I would suggest you try

import { Button } from 'react-bootstrap';

本文标签: