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

351
Vistas
Uncaught ReferenceError: require is not defined (client side js)

Im trying to create a youtube plugin (source code: https://github.com/abhishek-jha-24/EXTENSION) The main javascript code is in content_scripts.js file and from that file i want to access a script1.py file which will give me some data and to access that .py file i've used this tutorial https://medium.com/swlh/run-python-script-from-node-js-and-send-data-to-browser-15677fcf199f

However when i add my extension to chrome it gives me this err:

Uncaught ReferenceError: require is not defined

and now i got to know that we cannot use require in client side JavaScript, but without require how would i access the spawn module from NodeJS which is giving me access to my python file.

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

0

use import {spawn} from "child_process"

about 4 years ago · Juan Pablo Isaza Denunciar

0

After looking at your code it seems that you are trying to run that code in a browser. It is not possible because you are trying to access apis specific to nodejs in 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