0

I have just add react-avatar-edit package and just import the package,

import Avatar from 'react-avatar-edit';

after that i can run yarn start command i was got the ReferenceError: window is not defined in react-avatar.js file.please give some idea to solving this issue. also I have attached screenshot https://prnt.sc/opv5hg

9
  • Is your code Server side rendering? Commented Aug 8, 2019 at 5:22
  • I just impot the package in my component file Commented Aug 8, 2019 at 5:23
  • I know that. I mean are you render react on your server? Commented Aug 8, 2019 at 5:25
  • its client side rendering Commented Aug 8, 2019 at 5:28
  • After importing package, did you restart your app? Commented Aug 8, 2019 at 5:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.