jQuery: $ name not found

I’m using meteor in my application. As jquery packge is pre-available when i’m trying to use symbol $ it is giving a warning saying: $ name not found when i run the meteor command. but the functionality works fine.

Can you help me how to solve this?

I’m not quite sure what you mean here. Can you post the exact error message you’re getting?

I removed the errors by installing jquery through npm and import it:

import * as $ from 'jquery';

Meteor will use the newly installed jquery as the default after you have installed it.

If you’re not actually replacing jQuery,

import { $ } from 'meteor/jquery';

is what works for me.

Thanks for the reply. But it is saying “meteor/jquery” module not found.

It is saying can’t find module jquery


Check the packages file in .meteor folder? If there is a row for jquery there, there should be no problems. Post some descriptive error logs please.