Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npx npm-packlist broken #164

Closed
1 task done
GeoffreyEmerson opened this issue Mar 19, 2023 · 3 comments
Closed
1 task done

[BUG] npx npm-packlist broken #164

GeoffreyEmerson opened this issue Mar 19, 2023 · 3 comments

Comments

@GeoffreyEmerson
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Official npm docs (here) recommend using npx npm-packlist.

To see what will be included in your package, run npx npm-packlist.

I believe that feature was broken in #128 with the removal of the "bin" property from "package.json".

Current behavior is:

$ npx npm-packlist
npm ERR! could not determine executable to run

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2023-03-19T00_30_14_201Z-debug-0.log

@nlf noted in the PR that "the npm-packlist bin has also been removed." but did not explain why.

Expected Behavior

npx npm-packlist should a list of files that will be included during npm publish.

Steps To Reproduce

  1. In a repo of a project that is ready to be published to npm
  2. Execute on the command line npx npm-packlist

Environment

  • npm: 8.19.3
  • Node: 18.13.0
  • OS: macOS 13.2.1
  • platform: Macbook Pro
  • iTerm2
  • zsh
@GeoffreyEmerson GeoffreyEmerson added Bug thing that needs fixing Needs Triage needs an initial review labels Mar 19, 2023
@staff0rd
Copy link

A workaround for now is npx npm-packlist@6

@wraithgar wraithgar added Documentation and removed Bug thing that needs fixing Needs Triage needs an initial review labels Mar 30, 2023
@staff0rd
Copy link

Correct/new way is to run npm pack --dry-run . Docs are being updated

@wraithgar
Copy link
Member

Unfortunately due to the way our dependencies are set up this bin can't work, there was a circular dependency on @npmcli/arborist that would prevent us from updating our packages.

Realistically this is a bad idea anyways since this package doesn't parse your config or cli args like npm itself, so npm will always be the more correct way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants