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

356
Views
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 answers
Answer question

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 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!