Error module not found: Can't resolve 'jquery' in react

Dung Do Tien Jun 06 2021 966

Hi, I have been creating a project with React. It still builds and working fine for me. But today I got an error:

 Module not found: Can't resolve 'jquery'

I installed Jquery before and import it to App.js file 

 import $ from 'jquery';

Do you have any ideas to help me resolve this issue?

Have 2 answer(s) found.
  • N

    Nguyễn Phong Jun 06 2021

    Hi, the message recommendation is that run de command npm install --save jquery, I run this command and the error was fixed. I hope it helpful for you!!

  • D

    Devx Mon Jun 06 2021

    I think you need to re-install npm

     nmp install

     And it works for me.

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close