{"id":26058,"library":"packer-cli","title":"Packer CLI","description":"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.","status":"active","version":"2.17.8","language":"javascript","source_language":"en","source_url":"https://github.com/yohangz/packer-cli","tags":["javascript","Library CLI","Node Library","NPM Library","Browser Lib","Lib CLI","typescript"],"install":[{"cmd":"npm install packer-cli","lang":"bash","label":"npm"},{"cmd":"yarn add packer-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add packer-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package ships both ESM and CJS; ESM import is recommended for TypeScript projects.","wrong":"const packer = require('packer-cli')","symbol":"packer","correct":"import packer from 'packer-cli'"},{"note":"Named export available from root; no need for deep imports.","wrong":"import { PackerConfig } from 'packer-cli/lib/config'","symbol":"PackerConfig","correct":"import { PackerConfig } from 'packer-cli'"},{"note":"createProject is a named export, not default. Avoid deep source imports.","wrong":"import createProject from 'packer-cli/src/createProject'","symbol":"createProject","correct":"import { createProject } from 'packer-cli'"}],"quickstart":{"code":"import { createProject } from 'packer-cli';\n\nasync function scaffold() {\n  await createProject({\n    name: 'my-lib',\n    template: 'default',\n    transpiler: 'babel',\n    test: 'jest',\n    css: 'sass',\n    react: false\n  });\n  console.log('Project scaffolded.');\n}\nscaffold().catch(console.error);","lang":"typescript","description":"Demonstrates scaffolding a new Node library project with Packer CLI using default template, Babel transpiler, Jest testing, and SASS CSS."},"warnings":[{"fix":"Use Packer CLI only for greenfield projects or ensure your existing build tools do not interfere.","message":"The package relies heavily on Gulp and Rollup. If you already have a custom build setup, integrating Packer CLI may cause conflicts.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"After scaffolding, replace TSLint with ESLint using the @typescript-eslint parser.","message":"Packer CLI may generate projects with deprecated TSLint instead of ESLint for TypeScript linting. TSLint is deprecated in favor of ESLint with typescript-eslint.","severity":"gotcha","affected_versions":">=2.0.0 <2.18"},{"fix":"Use Unix-like environment (WSL) or ensure your project paths use forward slashes.","message":"Live-reloading may fail on Windows systems due to path separator issues in Gulp watch tasks.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install locally: npm install --save-dev packer-cli, then use npx packer","cause":"Missing local installation; global install may not resolve.","error":"Error: Cannot find module 'packer-cli'"},{"fix":"Use npm instead of pnpm for Packer CLI managed projects.","cause":"Packer CLI generates a package-lock.json but may not be compatible with pnpm.","error":"ERR_PNPM_LOCKFILE_COPY_FAILED"},{"fix":"Ensure a valid gulpfile.js exists in the project root.","cause":"Custom Gulpfile may not be present or incorrectly configured.","error":"TypeError: Cannot read property 'tasks' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}