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

358
Vistas
Getting JS error after changing versions: Uncaught ReferenceError: Xyz is not defined

I was using react-vis library. Their readme file says following:

If you're working in a non-node environment, you can also directly include the bundle and compiled style using basic html tags.

<link rel="stylesheet" href="https://unpkg.com/react-vis/dist/style.css">
<script type="text/javascript" src="https://unpkg.com/react-vis/dist/dist.min.js"></script>

The global reactVis object will now be available for you to play around.

When I do exactly that, it works and I was able to use reactVis object in my code. It links versions 1.11.7 from unpkg. I wanted to try out version 1.11.5. So, I tried following:

<link rel="stylesheet" href="https://unpkg.com/react-vis@1.11.5/dist/style.css">
<script type="text/javascript" src="https://unpkg.com/browse/react-vis@1.11.5/dist/dist.min.js"></script>

But, now it gives me following error:

Uncaught ReferenceError: reactVis is not defined

Somehow, it is not able to get reference to reactVis code. Why is this so?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The link you used contains https://unpkg.com/browse/... /browse links to the html preview page of the file.

To link to the raw version of the file remove /browse in your case to https://unpkg.com/react-vis@1.11.5/dist/dist.min.js, which would link to the file raw.

eg.

console.log(
  reactVis
)
<link rel="stylesheet" href="https://unpkg.com/react-vis@1.11.5/dist/style.css">
<script type="text/javascript" src="https://unpkg.com/react-vis@1.11.5/dist/dist.min.js"></script>

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