npm-to-pnpm

Convert npm lockfiles and configure pnpm workspaces for migration.

76|3|Updated May 31, 2025
One-click install
npx skills add https://github.com/Parallel-7/FlashForgeUI-Electron --skill npm-to-pnpm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: npm-to-pnpm
Source: https://github.com/Parallel-7/FlashForgeUI-Electron/tree/main/.claude/skills/npm-to-pnpm
Command: npx skills add https://github.com/Parallel-7/FlashForgeUI-Electron --skill npm-to-pnpm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates npm projects to pnpm by converting lockfiles, configuring workspaces, and updating CI/CD pipelines to use pnpm.

Core Features & Use Cases

  • Convert package-lock.json to pnpm-lock.yaml for standalone projects and monorepos.
  • Create and configure pnpm-workspace.yaml for multi-package repos and workspaces.
  • Update CI/CD workflows to install via pnpm and adapt scripts.
  • Provide troubleshooting guidance to address migration edge-cases and ensure compatibility across projects.

Quick Start

Run pnpm import to convert the lockfile to pnpm-lock.yaml, update workspace configuration, and validate the migrated setup.

Frequently Asked Questions about npm-to-pnpm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an npm lockfile to pnpm for an existing project?

To migrate an npm project to pnpm, run pnpm import to convert your package-lock.json into a pnpm-lock.yaml file, preserving your resolved dependency tree without requiring a full reinstall.

Can I migrate an npm workspaces monorepo to pnpm workspaces?

Yes, you can migrate npm workspaces to pnpm by creating a pnpm-workspace.yaml file to define your monorepo packages, ensuring multi-package repo configurations are correctly updated for pnpm compatibility.

How do I update CI/CD pipelines when migrating from npm to pnpm?

When migrating from npm to pnpm, update your CI/CD pipelines by modifying the installation steps to use pnpm instead of npm, adapting your workflow scripts to ensure proper package installation in automated environments.

What is the best way to handle edge cases when migrating to pnpm?

The best way to handle pnpm migration edge cases is to use troubleshooting guidance that validates compatibility, addressing specific lockfile conversion or workspace configuration issues to ensure a smooth transition.

Does migrating from npm to pnpm require updating workspace configuration?

Yes, migrating from npm to pnpm requires updating workspace configuration by replacing npm workspaces definitions with a pnpm-workspace.yaml file, ensuring the monorepo structure remains compatible with pnpm's strict node_modules layout.