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

334
Views
How do I fix "jQuery is not defined" error?

I am compiling my JavaScript code using Laravel Mix.

This is my JS code:

import $ from 'jquery';
window.$ = window.jQuery = $;

I have also tried:

import {$,jQuery} from 'jquery';
window.$ = $;
window.jQuery = jQuery;

This used to work earlier, but suddenly today, in my front end code, It is saying:

jQuery is not defined

jQuery version: 3.6.0

laravel-mix version: 6.0.6

Can anyone help me?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

In bootstrap.js...

window._ = require('lodash');
window.$ = window.jQuery = require('jquery');
about 4 years ago · Juan Pablo Isaza Report

0

In your bootstrap.js define with try{}..catch{}

try {
    window.$ = window.jQuery = require('jquery');
} catch (e) {}
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!