I am having a MERN website with 2 folders in the Github repo, client
and backend
. When I am turning on the react server the output page is showing an error as
Failed to compile
./src/components/Student/Student.jsx
Module not found: Can't resolve 'react-avatar' in '/MernCrudApp/client/src/components/Student'
This error occurred during the build time and cannot be dismissed.
To reproduce this error please follow the following steps.
- Clone the repo
- Go into the
backend
folder and writenpm install
in the terminal and thennpm run start
, and then enter theclient
folder and repeat the commands respectively.
CodePudding user response:
There is no 'react-avatar' package in your client
's package.json
.
npm install react-package
in this folder and you should be good.