trouble importing jquery
See original GitHub issueHaving difficulty when importing jquery in create-react-app project. when adding in import $ from 'jquery'
with a npm -v of 3.10.10, will receive the following when logging $
: // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery…
.
current repo: https://github.com/faurenlarr/personalsite
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to import jquery using ES6 syntax? - Stack Overflow
The issue is that when using import syntax angular.js and jquery will always be imported before you have a chance to assign jquery...
Read more >5 Easy Ways to Fix the "jQuery is Not Defined" Error - Kinsta
The "jQuery is not defined" error means a call for a specific jQuery that wasn't available when the website loaded. Here's how to...
Read more >How to use jQuery with Laravel and Vite - DevDojo
Fret not, because in this post we will go over how to install it, import it, and how to use it with Laravel...
Read more >jQuery Get Started - W3Schools
Adding jQuery to Your Web Pages. There are several ways to start using jQuery on your web site. You can: Download the jQuery...
Read more >Proper way to import the jQuery library to a webpage.
After several days of trying to figure out EXACTLY how to import the jQuery library so that I can use it in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it would not be working as usual as in including it with a script tag, you need to import $ every time you want to use jquery in a file.
so adding
import $ from 'jquery'
to the top of this file https://github.com/faurenlarr/personalsite/blob/master/src/main.js file should make the commented code work. (if you uncomment it of course 😄)That helped, thanks!