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

224
Views
Jquery with JavaScript in nextjs

I have React.js project that needs to convert to a Next.js

This project has a file data-pulse-provider.js

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


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

var DataPulseProvider = /** @class */ (function () {
 //...
}());
export { DataPulseProvider };

Here I am getting an error

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

I think this window object is not available all the time in next.js. The solution I found was use dynamic imports with SSR false and then use useEffect to window object-related code. But this is a pure js file hence I can't use the useEffect or something like that. So how can I fix this issue?

Any help! Thanks in advance.

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