Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
React: How to figure out import path of node modules

Environment

I'm using Typescript with react.

I've installed react-bootstrap-date-picker with yarn install react-bootstrap-date-picker.

The website does not tell how to import the component.

Question

From looking at the installed node module (within the node_modules folder), how do I figure out the import path of the component?

What I've tried

I tried import { DatePicker as BSDatePicker } from 'react-bootstrap-date-picker';, but it errors out Could not find a declaration file for module 'react-bootstrap-date-picker'.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try default import:

import DatePicker from 'react-bootstrap-date-picker';

about 4 years ago · Juan Pablo Isaza Report

0

You are using curly braces which is not required. Try this

import DatePicker as BSDatePicker from 'react-bootstrap-date-picker';

Curly braces are used for normal imports (imports which are not default imports) while if we import something without curly braces, it means that it is default import.

Hope that this link will help you to understand further.

https://mindsers.blog/post/javascript-named-imports-vs-default-imports/

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!