{"id":18921,"library":"vue-unused-components-checker","title":"Vue Unused Components Checker","description":"A CLI tool to detect unused `.vue` components in Vue.js projects. Version 1.1.2 (latest as of May 2021) scans the file tree for `.vue` files and checks if they are imported and used anywhere. It supports limiting open files for large directories and ignoring glob patterns (e.g., node_modules). The tool is simple, focused, and works with Vue 2 projects. It is not actively maintained (no releases since 2021). Alternatives like `eslint-plugin-vue` with `no-unused-components` provide deeper analysis.","status":"maintenance","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/BerniWittmann/vue-unused-components-checker","tags":["javascript","check","vue","unused","components"],"install":[{"cmd":"npm install vue-unused-components-checker","lang":"bash","label":"npm"},{"cmd":"yarn add vue-unused-components-checker","lang":"bash","label":"yarn"},{"cmd":"pnpm add vue-unused-components-checker","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"For file pattern matching","package":"glob","optional":false}],"imports":[{"note":"Package is ESM-only. CommonJS require will fail.","wrong":"const checkUnusedComponents = require('vue-unused-components-checker')","symbol":"checkUnusedComponents","correct":"import { checkUnusedComponents } from 'vue-unused-components-checker'"}],"quickstart":{"code":"import { checkUnusedComponents } from 'vue-unused-components-checker';\nconst path = require('path');\nconst results = checkUnusedComponents({\n  rootDir: path.resolve('./src'),\n  ignorePatterns: ['**/node_modules/**'],\n  maxOpenFiles: 50\n});\nconsole.log(results.unused);","lang":"typescript","description":"Programmatic usage that scans src/ directory for unused .vue components and logs the list."},"warnings":[{"fix":"Run `check-unused-comp .` instead of trying to run the package name directly.","message":"CLI command is 'check-unused-comp', not 'vue-unused-components-checker'","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use `import` syntax or set `\"type\": \"module\"` in your package.json.","message":"CommonJS require does not work; package is ESM-only","severity":"breaking","affected_versions":">=1.0"},{"fix":"Switch to eslint-plugin-vue for better maintenance and integration.","message":"No updates since 2021; consider migrating to eslint-plugin-vue with no-unused-components rule","severity":"deprecated","affected_versions":">=1.0"},{"fix":"Use `-o 20` (no equals sign) to limit open files.","message":"Max open files option is -o but takes a number without flag name, e.g., -o 20","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.1.2':17 '2':63 '2021':22,73 'activ':68 'altern':74 'analysi':87 'anywher':38 'check':31,89 'checker':4 'cli':6 'compon':3,12,84,92 'deeper':86 'detect':9 'directori':46 'e.g':51 'eslint':77 'eslint-plugin-vu':76 'file':25,29,43 'focus':58 'glob':49 'ignor':48 'import':35 'javascript':88 'larg':45 'latest':18 'like':75 'limit':41 'maintain':69 'may':21 'modul':53 'no-unused-compon':81 'node':52 'open':42 'pattern':50 'plugin':78 'project':15,64 'provid':85 'releas':71 'scan':23 'simpl':57 'sinc':72 'support':40 'tool':7,55 'tree':26 'unus':2,10,83,91 'use':37 'version':16 'vue':1,11,28,62,79,90 'vue.js':14 'work':60","created_at":"2026-04-25T07:40:50.407049+00:00","updated_at":"2026-04-25T07:40:50.407049+00:00","problems":[{"fix":"Use `check-unused-comp .` instead of `vue-unused-components-checker .`","cause":"CLI command called incorrectly; package might be installed globally but command name is different.","error":"Error: Cannot find module 'vue-unused-components-checker'"},{"fix":"Use `import { checkUnusedComponents } from 'vue-unused-components-checker'` or convert project to ESM.","cause":"Using CommonJS require on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Use `-o 20` to limit open files and avoid hitting the OS path length limit.","cause":"File paths too long when scanning large directories with many nested folders.","error":"ENAMETOOLONG: name too long"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"vue-unused-components-checker","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/BerniWittmann/vue-unused-components-checker","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vue-unused-components-checker","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}