• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "udemy". Back to normal view / Search all groups
    1. Yarn, React, and Udemy. Help requested.

      My apologies if this kind of content is not allowed here. Mod(s) please feel free to delete it if it is not without any butthurt on my part. I'm new to React Testing, so I am taking an Udemy...

      My apologies if this kind of content is not allowed here. Mod(s) please feel free to delete it if it is not without any butthurt on my part.

      I'm new to React Testing, so I am taking an Udemy course on it. The Udemy course uses yarn, so I would like to stick with that though I do know yarn isn't the top accepted tool in the React community.

      I've posted this question elsewhere, I haven't gotten any responses, so I am posting it here ( costs nothing ).

      I am getting this error when executing yarn build:

      $ yarn build
      yarn run v1.22.22
      $ react-scripts build
      Creating an optimized production build...
      Failed to compile.
      
      TS2305: Module '"web-vitals"' has no exported member 'ReportHandler'.
        > 1 | import { ReportHandler } from 'web-vitals';
            |          ^^^^^^^^^^^^^
          2 |
          3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => {   
          4 |   if (onPerfEntry && onPerfEntry instanceof Function) {      
      
      
      error Command failed with exit code 1.
      

      I've tried installing web-vitals over what is already in the modules section, but that hasn't helped.

      Any clues appreciated!


      Update: the tip about ReportHandler being deprecated helped. I ran create react app in a new folder, did NOT run yarn update as the instructor called for,moved my work over, and now everything runs fine.


      7 votes