question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module "jquery"

See original GitHub issue

I am porting over some old code that uses jQuery. For now, I need jQuery in my project (will slowly get rid of it). I added it to my dependencies in package.json and ran npm install. I see jquery under node_modules now.

In my component file, when I add import $ from 'jquery';, I see this error:

Uncaught Error: Cannot find module "jquery" webpackMissingModule

I referred to https://github.com/facebookincubator/create-react-app/issues/614 but still no luck.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

42reactions
weswithleycommented, Jun 29, 2017

if anyone uses jquery 3.x , please use import 'jquery/src/jquery';

6reactions
gaearoncommented, Dec 10, 2016

No worries, if you have any problems please file issues! We’re happy to help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Cannot find module 'jquery' - Stack Overflow
Uncaught Error: Cannot find module 'jquery' · npm cache clean , npm install jquery (to my app folder) · npm install --save jquery...
Read more >
Uncaught Error: Cannot find module 'jquery' #2631 - GitHub
Am I missing some dependency in package.json? What I have already tried: npm cache clean, npm install jquery (to my app folder); npm...
Read more >
jquery - npm
JavaScript library for DOM operations. Latest version: 3.6.3, last published: 7 days ago. Start using jquery in your project by running `npm ...
Read more >
cannot find module jquery spfx - SPGuides
cannot find module jquery spfx. The error will comes if jQuery is not installed in SPFx solutions. Run the below command to install...
Read more >
Module not found: Can't resolve 'jquery' error | bobbyhadz
To solve the error "Module not found: Error: Can't resolve 'jquery'", make sure to install the jquery package by opening your terminal in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found