Reference error, $ is undefined even with jQuery installed

Hello
I’m trying to use jQuery to use for HTTP requests, I've installed jQuery in packages.json but when I use the dollar sign (.get), it errors saying $ is undefined. I didn’t really find anyone having the same problem.
Project link: https://glitch.com/~omya-afdas

uhm you defined your variable with jQuery not $ and also i don’t think it is a good idea to use jquery in node.js, there are much better and smaller packages for that (e.g. node-fetch).

When I define as require("jquery"), it still errors but saying that .get is not a valid function.

I tried using node-fetch and now it works, thanks.

2 Likes