Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an error in the console on import {scan} from 'react-scan' #297

Open
artashes-sanoyan opened this issue Feb 28, 2025 · 1 comment

Comments

@artashes-sanoyan
Copy link

Thanks for this amazing package.

I'm trying to integrate this package in my electron-vite project like it's demonstrated in the docs, everything works perfectly fine, but I'm getting following error logged into the console on each reload: bad HTTP response code (404) was received when fetching the script.

This is how I'm importing the package:

import { scan } from 'react-scan'

import ReactDOM from 'react-dom/client'

scan({
  log: false,
  enabled: true
})

Below this code I actually create component tree root.

There are no other scripts that are executed before this one in the renderer process and I'm not importing anything else from react above those lines. I'm able to use the module by including <script src="https://unpkg.com/react-scan/dist/auto.global.js"></script> and I don't get any errors, but the problem with approach is that I should conditionally apply the scan if according env is true.

@lxsmnsyc
Copy link
Collaborator

This is caused by the service worker registration by bippy. We are working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants