question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cra-append-sw not working

See original GitHub issue

i added :

"start": "npm-run-all -p watch-css start-js && cra-append-sw --mode dev ./firebase-messaging-sw.js",
 "build": "npm run build-css && react-scripts build && ra-append-sw ./firebase-messaging-sw.js",

with ./firebase-messaging-sw.js place in /public/firebase-messaging-sw.js but no service worker registed after : npm run start

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tszarzynskicommented, Aug 28, 2018

@hungdt-ibl That’s probably why the SW code is not being appended. I’ve seen this one before but I thought it was fixed already. Can you run the script with --skip-compile option? That should fix that error.

0reactions
tszarzynskicommented, Oct 31, 2018

The dependencies issues should be fixed with #13.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cra-append-sw not working · Issue #12 - GitHub
You may not need to use cra-append-sw. I was able to register the addition service worker by placing it in my public directory...
Read more >
How to build using cra-append-sw now that @babel/polyfill ...
Silly error. The custom-sw.js file was inside /src, but it needed to be in / (the root folder). Moving it to / solved...
Read more >
cra-append-sw - npm
Utility tool to append custom code to ServiceWorker created by Create React App. Latest version: 2.7.0, last published: 3 years ago.
Read more >
cra-append-sw examples - CodeSandbox
Learn how to use cra-append-sw by viewing and forking cra-append-sw example apps on CodeSandbox. ... github.com/bbhlondon/cra-append-sw/issues.
Read more >
rr-cra-append-sw - npm Package Health Analysis - Snyk
Learn more about rr-cra-append-sw: package health score, popularity, ... A total of 3 vulnerabilities or license issues were detected.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found