3

Using

angular cli 8.3.8, 
bootstrap 4.4.4
ngx-bootstrap 5.6.1, 

Everything works great in development. But when I compile with --prod, I get the following errors below. We must get the --prod to work. The datepicker looks and works great, don't want to have to remove it.

ERROR in node_modules/ngx-bootstrap/datepicker/ngx-bootstrap-datepicker.d.ts.BsDatepickerContainerComponent.html(60,7): Property 'chosenRange' does not exist on type 'BsDatepickerContainerComponent'.
node_modules/ngx-bootstrap/datepicker/ngx-bootstrap-datepicker.d.ts.BsDatepickerContainerComponent.html(62,7): Property 'setRangeOnCalendar' does not exist on type 'BsDatepickerContainerComponent'.
node_modules/ngx-bootstrap/datepicker/ngx-bootstrap-datepicker.d.ts.BsDatepickerInlineContainerComponent.html(60,7): Property 'chosenRange' does not exist on type 'BsDatepickerInlineContainerComponent'.
node_modules/ngx-bootstrap/datepicker/ngx-bootstrap-datepicker.d.ts.BsDatepickerInlineContainerComponent.html(62,7): Property 'setRangeOnCalendar' does not exist on type 'BsDatepickerInlineContainerComponent'.
3
  • This question is hard to answer, as there are a lot of important details missing. Try to put yourself in the shoes of those who know nothing about your problem. Make sure to edit your question to include all relevant content. Providing a minimal reproducible example will increase your chances of getting good answers. Commented Apr 11, 2020 at 19:46
  • I generally occurs by unmatched version. change. Change ngx-bootstrap version Commented Apr 11, 2020 at 19:47
  • Minimal reproducibility: ng new myApp npm i ngx-bootstrap Use anywhere: <input type="text" bsDatepicker #dp="bsDatepicker" Commented Apr 22, 2020 at 14:16

2 Answers 2

5

I had the same problem, try to downgrade ngx-bootstrap version to '5.1.0'.

Use the command npm install [email protected]

Sign up to request clarification or add additional context in comments.

Comments

1

change at package.json to "ngx-bootstrap": "5.6.2" and run npm i.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.