Registry / devops / rollup-plugin-install

rollup-plugin-install

JSON →
library0.0.5jsnpmunverified

A Rollup/Vite plugin that automatically installs missing dependencies during the build process. Version 0.0.5 (stable, no recent updates) integrates into Vite or Rollup config and triggers npm/yarn install when an imported module is not found. Differentiator: eliminates manual install steps during development, but limited to simple use cases and may not handle edge cases like version conflicts. Alternative to manual dependency management or tools like pnpm.

npm install rollup-plugin-install
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-INST
R
rollup-plugin-install
devopsjavascriptv0.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

autoInstallPlugin
✓ import { autoInstallPlugin } from 'rollup-plugin-install'
✗ const { autoInstallPlugin } = require('rollup-plugin-install')
ESM import is preferred; CJS require works but may have issues in strict ESM projects.
default import (autoInstallPlugin)
✓ import autoInstallPlugin from 'rollup-plugin-install'
✗ const autoInstallPlugin = require('rollup-plugin-install')
Both named and default imports export the same function; default import is simpler.

Configures Vite to automatically install missing dependencies using npm.

// vite.config.js import { defineConfig } from 'vite'; import { autoInstallPlugin } from 'rollup-plugin-install'; export default defineConfig({ plugins: [ autoInstallPlugin({ bin: 'npm' }), ], });
Debug
Known issues
gotchaPlugin only triggers on build, not in dev server's hot reload.
fix
Manually install dependencies before starting dev server.
affects: >=0.0.0
deprecatedPackage has not been updated since 2020; use at your own risk.
fix
Consider using alternative solutions like pnpm or manual install steps.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'some-package'
Plugin did not run because options misconfigured or plugin not applied correctly.
fix
Ensure autoInstallPlugin is in the plugins array and options.bin is set correctly (npm/yarn).
Upgrade
Version history
0.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
2
Resources
rollup-plugin-install — npm install rollup-plugin-install · libregistry