cannot find module ‘jquery’ or its corresponding type declarations

In this tutorial, I will show you how to fix the error “cannot find module ‘jquery’ or its corresponding type declarations” that comes when developing a SharePoint framework crud operations with no javascript framework, I got the error while I tried to run the below command:

gulp serve

The error comes as:

error TS2307: Cannot find module ‘jquery’, and the error looks like below:

cannot find module 'jquery' or its corresponding type declarations

The same error sometimes, you will get after adding the web part to a modern SharePoint page like the one below:

[SPLoaderError.loadComponentError]: Failed to load component “”. Original error. Failed to load entry point from component. Error loading… Cannot find module ‘jquery’

cannot find module 'jquery'

cannot find module ‘jquery’ or its corresponding type declarations

The error will come if jQuery is not installed in SPFx solutions. Run the below command to install jQuery in the SPFx solution.

npm install jquery --save
cannot find module 'jquery' or its corresponding type declarations

If the solution did not work, then you can try to install the exact version of jQuery by running the below command:

npm uninstall @types/jquery

npm install @types/jquery@3.5.1 --save

Also, you can refer to the jQuery from the CDN. Open the config/config.json file and then add the below code:

"externals":{
"jquery": "https://code.jquery.com/jquery-3.1.0.min.js"
},

Ideally, if you want to use jQuery in SPFx web parts, then you should install the type declarations for jQuery.

npm install --save-dev @types/jquery

This way, you can fix the error: cannot find module ‘jquery’ or its corresponding type declarations

You may also like the following tutorials:

Leave a Comment

⏰ LIMITED-TIME OFFER

Join the SharePoint & Power Platform Developer Live Training

📅 Live training starts October 5, 2026
SharePoint Development
Power Apps & Power Automate
Copilot Studio
🎁
FREE 1-Year Access to SPGuides.Academy

Enroll now and get access to all 9 academy courses at no extra cost.

Secure your seat before the batch fills up.
Get the live training plus the complete SPGuides.Academy learning library.

Enroll Now & Get Your FREE 1-Year Academy Access → View live training details and schedule
Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Live Webinar

SharePoint Integration Power Apps Form With Repeating Table [Invoice Management System]

Learn how to build an invoice management system using SharePoint integration and a repeating table.

📅 2nd September 2026 – 10:00 AM EST | 7:30 PM IST

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App