Registry / devops / packer-cli

packer-cli

JSON →
library2.17.8jsnpmunverified

Full-featured CLI tool for scaffolding and packaging Node library modules compliant with both Node.js and browsers. At version 2.17.8, it integrates Rollup for bundling, Gulp for task automation, Babel for transpilation, and supports multiple test frameworks (Mocha, Jest, Jasmine, Karma) and style preprocessors (PostCSS, LESS, SASS, Stylus). Differentiates itself by enforcing best practices and providing a unified workflow for file-watching, live-reloading, transpilation, bundling, and unit testing with coverage. Ships TypeScript types, supports React, Handlebars, and JSdom. Release cadence appears irregular; no major releases recently.

npm install packer-cli
INSTALL
IMPORT
SIG · PACKER-CLI
P
packer-cli
devopsjavascriptv2.17.8
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.

packer
import packer from 'packer-cli'
const packer = require('packer-cli')
Package ships both ESM and CJS; ESM import is recommended for TypeScript projects.
PackerConfig
import { PackerConfig } from 'packer-cli'
import { PackerConfig } from 'packer-cli/lib/config'
Named export available from root; no need for deep imports.
createProject
import { createProject } from 'packer-cli'
import createProject from 'packer-cli/src/createProject'
createProject is a named export, not default. Avoid deep source imports.

Demonstrates scaffolding a new Node library project with Packer CLI using default template, Babel transpiler, Jest testing, and SASS CSS.

import { createProject } from 'packer-cli'; async function scaffold() { await createProject({ name: 'my-lib', template: 'default', transpiler: 'babel', test: 'jest', css: 'sass', react: false }); console.log('Project scaffolded.'); } scaffold().catch(console.error);
packer-cli --version
Debug
Known issues
gotchaThe package relies heavily on Gulp and Rollup. If you already have a custom build setup, integrating Packer CLI may cause conflicts.
fix
Use Packer CLI only for greenfield projects or ensure your existing build tools do not interfere.
affects: >=2.0.0
gotchaPacker CLI may generate projects with deprecated TSLint instead of ESLint for TypeScript linting. TSLint is deprecated in favor of ESLint with typescript-eslint.
fix
After scaffolding, replace TSLint with ESLint using the @typescript-eslint parser.
affects: >=2.0.0 <2.18
gotchaLive-reloading may fail on Windows systems due to path separator issues in Gulp watch tasks.
fix
Use Unix-like environment (WSL) or ensure your project paths use forward slashes.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'packer-cli'
Missing local installation; global install may not resolve.
fix
Install locally: npm install --save-dev packer-cli, then use npx packer
ERR_PNPM_LOCKFILE_COPY_FAILED
Packer CLI generates a package-lock.json but may not be compatible with pnpm.
fix
Use npm instead of pnpm for Packer CLI managed projects.
TypeError: Cannot read property 'tasks' of undefined
Custom Gulpfile may not be present or incorrectly configured.
fix
Ensure a valid gulpfile.js exists in the project root.
Upgrade
Version history
2.17.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
packer-cli — npm install packer-cli · libregistry