pushtell / react-bootstrap-date-picker

React-Bootstrap based date picker.
MIT License
347 stars 195 forks source link

Module not found: Can't resolve 'react-bootstrap/lib/Button' in '/var/www/html/quiz-management/frontend/node_modules/react-bootstrap-date-picker/lib' #161

Closed amon-shadow closed 5 years ago

amon-shadow commented 6 years ago

JUst Install and Use

ngrt commented 6 years ago

You can solve this by installing the 'create-react-class' lib. npm i --save create-react-class

lauracabre commented 5 years ago

This didn't work for me. Still having the same issue

orwell1984 commented 5 years ago

Having the same issue. Installing react-bootstrap did not help(it was installed in my project long ago)

orwell1984 commented 5 years ago

@lauracabre - did you manage to fix this somehow?

lardois commented 5 years ago

Not compatible with react-bootstrap ^1.0.0?

hebbian commented 5 years ago

2019 march

I'm still have this issue, and have no idea how to fix it properly

rakaar commented 5 years ago

hey, is this issue solved? Because I have facing the same issue even in verson 1.0.0-beta.8

krupa147 commented 5 years ago

Did anyone find the solution to this?

ridbay commented 5 years ago

I am facing the same challenge with this, Anyone with any solution on this?

ridbay commented 5 years ago

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

ridbay commented 5 years ago

Did anyone find the solution to this?

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

ridbay commented 5 years ago

2019 march

I'm still have this issue, and have no idea how to fix it properly

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

mohamedsgap commented 5 years ago

Did anyone find the solution to this?

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

Yes, mate it worked for me

erhanfirat commented 5 years ago

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

Can you share the code? I have added but did not work for me...

mohamedsgap commented 5 years ago

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

Can you share the code? I have added but did not work for me... of course, mate @kirlisakal

import Form from 'react-bootstrap/Form'

<Form.Group controlId="exampleForm.ControlTextarea1"> <Form.Label>Markdoen Input!</Form.Label> <Form.Control componentclass='textarea' placeholder='input Markdown' as="textarea" rows="10" value={markdown} onChange = {(event)=> this.updateMarkdown(event.target.value)}`

       ` >`
        `</Form.Control >`
    `  </Form.Group>`

sorry about format, this is my final solution, the previous one I posted there was a bus in it, so this is the right one and it works well now! Happy coding :)

erhanfirat commented 5 years ago

This is what I did import Form from 'react-bootstrap/Form' instead of import FormGroup from 'react-bootstrap/lib/FormGroup', import ControlLabel from 'react-bootstrap/lib/ControlLabel';, import FormControl from 'react-bootstrap/lib/FormControl'; Then I used Form.Group, Form.Label Form.Control components in place of FormGroup, ControlLabel, FormControl and my form works fine.

Can you share the code? I have added but did not work for me... of course, mate @kirlisakal

import Form from 'react-bootstrap/Form'

<Form.Group controlId="exampleForm.ControlTextarea1"> <Form.Label>Markdoen Input!</Form.Label> <Form.Control componentclass='textarea'` placeholder='input Markdown' as="textarea" rows="10" value={markdown} onChange = {(event)=> this.updateMarkdown(event.target.value)}

       ` >`
        `</Form.Control >`
    `  </Form.Group>`

sorry about format, this is my final solution, the previous one I posted there was a bus in it, so this is the right one and it works well now! Happy coding :)

Thanks a lot for quick reply. But, I could not catch it! where is date-picker?

mohamedsgap commented 5 years ago

@kirlisakal this is what I had to done for my app, I don't have an idea about date-picker, I used react-bootstrap for building markdown-reviewer,can u tell me about date-picker, I could help you!

hopeogbons commented 4 years ago

Try this: import { Button } from 'react-bootstrap';

imtourist314 commented 3 years ago

I'm stuck with the same problem with getting a simple DatePicker example working as well. I have installed: "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.4.0", "@testing-library/user-event": "^7.2.1", "ag-grid-community": "^24.1.0", "ag-grid-react": "^24.1.1", "axios": "^0.21.1", "bootstrap": "^4.5.3", "create-react-class": "^15.7.0", "d3": "^6.3.1", "http-proxy-middleware": "^1.0.4", "pm2": "^4.5.0", "react": "^16.12.0", "react-bootstrap": "^1.4.3", "react-bootstrap-date-picker": "^5.1.0", "react-dom": "^16.14.0", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", "react-scripts": "^3.4.4", "react-tooltip": "^4.2.11", "react-widgets": "^4.6.1" },

afurman-ralabs commented 3 years ago

If you will consider source code of the last version of react-bootstrap (currently it's 1.4.3), you'll reveal that there's no lib directory there. Because the last update of react-bootstrap-date-picker package is 3 years ago in the case with react-bootstrap that's 19 days ago.

To make it work, you have to find a release version of react-bootstrap that was relevant to the last release of date-picker time. I'm sure, this will resolve the issue.

Best regards.

ankitsoni301188 commented 3 years ago

./node_modules/react-bootstrap-date-picker/lib/index.js Module not found: Can't resolve 'react-bootstrap/lib/Button' in 'D:\WorkingDirectory\NodeJsProject\ReactApp\SheepInsurance\node_modules\react-bootstrap-date-picker\lib'

tried all

ankitsoni301188 commented 3 years ago

anyone was able to solved it?

msteel9999 commented 3 years ago

I tried all the versions. The lib/Button error goes away but you get an

TypeError: Cannot read property 'object' of undefined
./node_modules/react-bootstrap-date-picker/lib/index.js
node_modules/react-bootstrap-date-picker/lib/index.js:117
  114 | displayName: 'DatePickerCalendar',
  115 | 
  116 | propTypes: {
> 117 |   selectedDate: _react2.default.PropTypes.object,
      | ^  118 |   displayDate: _react2.default.PropTypes.object.isRequired,
  119 |   minDate: _react2.default.PropTypes.string,
  120 |   maxDate: _react2.default.PropTypes.string,