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

141
Views
La compilación de Reactjs falló en el intento de error de importación: el 'widget' no se exporta

Creé un nuevo proyecto React con Typescript y copié y pegué el archivo antiguo de otro proyecto que es solo un archivo .jsx. Este archivo está importando una clase llamada widget como este.

índice.jsx

 import { widget } from "../charting_library/charting_library";

Esta importación no funcionó debido a problemas de pelusa, así que agregué una entrada al archivo .eslintignore como esta

 src/pages/instuments/technicalAnalysis/charting_library/*.js

Entonces funcionó perfectamente bien con npm run start . Pero cuando traté de compilar usando el comando `npm run build. me tira este error

Intento de error de importación: 'widget' no se exporta desde '../charting_library/charting_library'.

el widget debe estar en la carpeta charting_libbray. De lo contrario, tampoco funcionará con npm run start.

Por otro lado, charting_library es una carpeta

 charting_library -charting_library.cjs.js -charting_library.d.ts -charting_library.esm.js -charting_library.js -charting_library.standalone.js -**package.json**

paquete.json es así

 { "private": true, "description": "CL v20.033 (internal id 9df149da @ 2021-11-17T10:20:51.511Z)", "type": "module", "main": "charting_library.cjs.js", "module": "charting_library.esm.js", "types": "charting_library.d.ts" } import { widget } from "../charting_library/charting_library";

¿A qué se refiere esta parte charting_library? Cuando intento hacer clic en + ctrl en la declaración de importación, apunta al archivo charting_library.d.ts. Creo que esa es la razón de este error. Si es así, ¿cómo puedo evitar eso?

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

0

Intente eliminar la segunda cadena charting_library en la declaración de importación: https://github.com/tradingview/charting-library-examples/issues/86#issuecomment-727867852

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!