Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
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 Respuestas
Responde la pregunta

0

Try default import:

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

about 4 years ago · Juan Pablo Isaza Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda