0

What should I do? I cannot create a react app using npm and while using npx I do not know why it gives me reportwebvitals.js or something and I need serviceworker.js

The error as an image:

The error as an image

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 3
    1. You mean `npx create-react-app `; and 2. yes, the service worker was removed from the default template in v4, if you want it use the PWA template. – jonrsharpe Jan 18 '21 at 08:47
  • 1
    npx and npm will both give you the same template, but in any case : npm init react-app my-app is the command for npm – Kevin.a Jan 18 '21 at 08:49
  • how to get the servicewroker.js ? –  Jan 18 '21 at 08:56
  • 1
    When you want to show textual information on Stack Overflow, please supply it as text. You can copy the text out of your console and use code formatting. Would you edit your question? – halfer Jan 20 '21 at 22:29

1 Answers1

1

use the npx, not npm

npx create-react-app myreact

it's will work well..

UP Manager
  • 63
  • 1
  • 9