Skip to content

pnpm pack does not work as npm pack #4792

@sdomas-cksource

Description

@sdomas-cksource

pnpm version: 6.24.2

Code to reproduce the issue:

mkdir test-pnpm-pack
cd test-pnpm-pack
pnpm pack @aws-sdk/client-sqs

Expected behavior:

mkdir test-pnpm-pack
cd test-pnpm-pack
npm pack @aws-sdk/client-sqs

It creates a tarball aws-sdk-client-sqs-3.95.0.tgz

Actual behavior:

pnpm pack does not create a tarball - I receive the error:  ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found

So my question is - can we have the same behavior for pnpm pack but with the addition of using pnpm store?
Or can we get some equivalent by other pnpm commands? I know about pnpm store add which adds the package to the store but how we can get the tarball from the store?

My use case is:

  1. I have pnpm store filled with the packages
  2. I use npm pack to download those package (as tarballs) which is not efficient - I would like to use pnpm store which already has cached those packages
  3. Ideally I would just replace npm pack with pnpm pack and pnpm pack can give me tarballs and it uses the cache (pnpm store) instead of redownloading it from the npm registry.

Additional information:

  • node -v prints: v16.13.2
  • Windows, macOS, or Linux?: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions