{"id":22818,"library":"vite-plugin-router-warn","title":"vite-plugin-router-warn","description":"A Vite plugin that suppresses the 'No match found for location with path' warning from vue-router during development. Version 2.0.0 is stable, with infrequent updates. It works by patching vue-router's internal warning suppressor to silence that specific warning when routes are dynamically added or refreshed. Only active in development mode, processes only vue-router files, and runs once at startup. Provides optional export of modified router file for debugging. Designed as a temporary fix until vue-router provides native support to disable the warning.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","vite","vue-router","vue-router4","vue-router-next","vue-router-warn","vite-plugin-router-warn","No match found for location with path","typescript"],"install":[{"cmd":"npm install vite-plugin-router-warn","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-router-warn","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-router-warn","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default import only. Named import is incorrect.","wrong":"import { removeNoMatch } from 'vite-plugin-router-warn'","symbol":"removeNoMatch","correct":"import removeNoMatch from 'vite-plugin-router-warn'"},{"note":"In CommonJS, you must use .default to get the default export.","wrong":"const removeNoMatch = require('vite-plugin-router-warn')","symbol":"removeNoMatch","correct":"const removeNoMatch = require('vite-plugin-router-warn').default"},{"note":"TypeScript types ship with the package. Use import type for option types.","symbol":"vite-plugin-router-warn types","correct":"import type { RemoveNoMatchOptions } from 'vite-plugin-router-warn'"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport removeNoMatch from 'vite-plugin-router-warn';\n\nexport default defineConfig({\n  plugins: [vue(), removeNoMatch()]\n});\n","lang":"typescript","description":"Demonstrates how to install and configure the plugin in a Vite project to suppress vue-router warnings."},"warnings":[{"fix":"No action needed; this is by design. The warning does not appear in production because vue-router does not show it in production builds.","message":"The plugin only works in development mode. In production builds, the warning is not suppressed.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check compatibility when upgrading vue-router. The plugin may need an update if vue-router internals change.","message":"The plugin modifies vue-router's internal module at runtime, which could break with vue-router updates.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Monitor vue-router changelog for 'suppressNoMatchWarning' or similar option. Then remove this plugin.","message":"If vue-router provides official configuration to suppress the warning, this plugin will become obsolete.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure route additions happen before the initial page load, or reload the page after adding routes.","message":"The plugin runs only once at startup. Dynamic routes added later still triggered the warning until patched; the plugin may not cover all cases.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install vite-plugin-router-warn -D or yarn add vite-plugin-router-warn -D","cause":"The package is not installed or is missing from node_modules.","error":"Cannot find module 'vite-plugin-router-warn'"},{"fix":"Change to `import removeNoMatch from 'vite-plugin-router-warn'`","cause":"Using named import instead of default import.","error":"SyntaxError: Named export 'removeNoMatch' not found. The requested module 'vite-plugin-router-warn' is a CommonJS module, which may not support all module.exports as named exports."},{"fix":"Invoke the plugin as a function: removeNoMatch()","cause":"Using the plugin with `plugins: [vue(), removeNoMatch]` instead of `plugins: [vue(), removeNoMatch()]`.","error":"TypeError: removeNoMatch is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}