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

121
Vistas
Why is jsfiddle saying the reference is undefined

I'm quite new to javascript and jsfiddle. I've been able to toy around with other fiddles that I find, but setting one up myself has proved difficult.

I'm attempting to use a library from npm to get a proof of concept for how it might work. I'm not sure why my import of the module is not working with jsfiddle.

What am I missing to get my fiddle working?

  • used the resourced bar to import the unpkg script
https://unpkg.com/browse/json-query@2.2.2/index.js
  • tried using the method outlined in the package readme
var json = [...]

jsonQuery('[DisplayText]', json)
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

When I follow the unpkg link I see that it has requires such as:

var State = require('./lib/state')

The problem is not only can the browser not understand require, it doesn't have files like ./lib/state available.

I think the problem here is that you are trying to download the raw source, which needs to be built with something like webpack before it can be used in the browser.

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