Registry / web-framework / vite-joylo-runtime-overlay

vite-joylo-runtime-overlay

JSON →
library1.1.44jsnpmunverified

A lightweight runtime error overlay plugin for Vite that displays runtime errors in-browser (like the Vite dev error overlay but for runtime) and optionally reports them to your backend for logging or auto-fix. Current stable version 1.1.44, released regularly. Ships TypeScript types. Peer dependencies: react >=17.0.0, react-dom >=17.0.0, vite >=5.0.0 <8.0.0. Differentiator: combines runtime error display with optional backend reporting, unlike Vite's built-in compile-time overlay.

npm install vite-joylo-runtime-overlay
INSTALL
IMPORT
SIG · VITE-JOYLO-RUNTIME
V
vite-joylo-runtime-overlay
web-frameworkjavascriptv1.1.44
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import runtimeErrorOverlay from 'vite-joylo-runtime-overlay'
import { runtimeErrorOverlay } from 'vite-joylo-runtime-overlay'
Default export only. Named import will result in undefined.
VitePluginRuntimeErrorOverlay
import type { VitePluginRuntimeErrorOverlay } from 'vite-joylo-runtime-overlay'
import { VitePluginRuntimeErrorOverlay } from 'vite-joylo-runtime-overlay'
This is a TypeScript type export, not a value. Use 'import type'.
RuntimeErrorOverlayOptions
import type { RuntimeErrorOverlayOptions } from 'vite-joylo-runtime-overlay'
const { RuntimeErrorOverlayOptions } = require('vite-joylo-runtime-overlay')
TypeScript type, not available at runtime. ESM-only package, require() fails.

Configures the plugin in Vite with optional backend reporting URL and auto-fix disabled.

// vite.config.ts import { defineConfig } from 'vite'; import runtimeErrorOverlay from 'vite-joylo-runtime-overlay'; export default defineConfig({ plugins: [ runtimeErrorOverlay({ reportUrl: process.env.ERROR_REPORT_URL ?? '', autoFix: false, includeStack: true, }), ], });
Debug
Known issues
gotchaPlugin must be added to the plugins array before any other plugins that transform runtime error handling.
fix
Place runtimeErrorOverlay() first in the plugins array.
affects: >=1.0.0
gotchareportUrl option must be a full URL (including protocol) or empty string. Relative URLs are not supported.
fix
Use 'https://example.com/report' or ''.
affects: >=1.0.0
deprecatedThe 'autoFix' option was deprecated in v1.1.0; use 'autoFixEndpoint' instead.
fix
Replace 'autoFix: true' with 'autoFixEndpoint: 'https://example.com/autofix'.
affects: >=1.1.0
gotchaOverlay may not appear if the error occurs before React is mounted (e.g., in module scope).
fix
Ensure errors are thrown inside React component lifecycle or use a custom error boundary.
affects: >=1.0.0
breakingIn v1.0.0, the plugin used CommonJS exports. v1.1.0 switched to ESM-only.
fix
Use import instead of require(). If using CommonJS, stay on v1.0.x or use dynamic import().
affects: >=1.1.0
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'includes')
reportUrl option is undefined instead of a string.
fix
Set reportUrl to a string or check environment variable is defined.
Error: [vite] Rollup failed to resolve import "vite-joylo-runtime-overlay"
Plugin not installed or incorrect package name.
fix
Run 'npm install -D vite-joylo-runtime-overlay' and verify package.json.
Uncaught ReferenceError: require is not defined
Using require() in an ESM-only package (v1.1+).
fix
Change to 'import runtimeErrorOverlay from 'vite-joylo-runtime-overlay''.
TypeError: runtimeErrorOverlay is not a function
Named import instead of default import.
fix
Use 'import runtimeErrorOverlay from ...' (without curly braces).
Upgrade
Version history
1.1.44latest on npm
Audit
Dependencies
reactrequiredJSX runtime required for overlay components
react-domrequiredDOM rendering for overlay
viterequiredPlugin API dependency, required at build/run time
Agent activity
47 hits · last 30 days
node
38
OpenAI (training)
1
Resources
vite-joylo-runtime-overlay — npm install vite-joylo-runtime-overlay · libregistry