serviceWorker.js file missing after running npx create-react-app
See original GitHub issueI’ve run the npx create-react-app
command twice and both times the serviceWorker.js file is missing under the /src directory. So when I try to import * as serviceWorker from ‘./serviceWorker’ I get a module not found error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
serviceWorker missing from ReactApp - reactjs - Stack Overflow
Hi All I realized just recently when CRA(npx create-react-app myapp) , serviceWorker is missing from ...
Read more >ServiceWorker not built in 4.x (next) #9776 - GitHub
The file is missing. This causes a problem with apps which are upgrading from prior CRA versions, as they continue to reference the...
Read more >Where is the Service Worker in a Create React App (CRA)
js file inside the src directory, you will see that by default, the service worker is not registered. So let's first register the...
Read more >PWA with Create React App and service workers
Go to the src/index. js file in your project and find the following lines of code: // If you want your app to...
Read more >Service worker isn't working? Here's a small detail you might ...
You might want to try the index.js file in the src folder. At the very last line (if you haven't modified anything), you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try running
npx create-react-app my-app --template cra-template-pwa
For TS
npx create-react-app my-app --template cra-template-pwa-typescript