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

134
Vistas
Next js jQuery with java script constructor functions

I have this flow of files.

enter image description here

In container.jsx component I import the udf-compatible-datafeed.js file like this

_createChart(){
 const UDFCompatibleDatafeed = (await import("./datafeeds/udf/src/udf-compatible-datafeed")).default;
}

This import failed and this gives me an error

Error: jQuery was not found. Please ensure jQuery is referenced before the SignalR client JavaScript file.

The error comes from this data-pluse-provider file

import { logMessage, } from './helpers';
import $ from 'jquery';

require('signalr');
window.jQuery = $;

const DataPulseProvider = function(){};

export {DataPulseProvider}

This file requires jQuery. I think due to SSR reasons. window object may not be defined here. I can't use nextjs dynamic imports here as well. Because this is a JavaScript file, not a jsx component.

But from the index.jsx component I import the component with next js dynamics and for the ContainerPage as well. But the error is still there.

How can I fix this with next.js? Any help!

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
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