-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] NPM v9 lose directory structure and pack/publish empty package #5853
Comments
There is not enough here to reproduce the issue. Notably the |
npm 9 changed how it parses its include/ignore lists. Please be sure to give a reproduction case that includes the contents of the package.json files, and any gitignore/npmignore files. |
Note that I had a package using this glob pattern in package.json:
Using npm 8, doing Using npm 9, Changing the glob pattern to this fixed the problem:
If helpful, I can create a repository to reproduce this. |
I suppose using this declaration would have been better in my case:
|
|
That helps, thank you. |
npm v9 changed how it parses its include/ignore lists, see npm/cli#5853 (comment). Where it would previously include all files within the `dist` directory with the following setting: ```json "files": [ "dist/**/" ] ``` In v9.5.0, this pattern matches nothing. This could lead to some packages being published empty (which occurred in connect-es) This PR updates the pattern to work with npm v9, verified by running `npm pack` with and without the change.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
when using npm >9 pack or publish produced empty package, just few headers
➜ pss-components git:(feature/PSS-390/componentsUpgrades) ✗ npm -v
9.1.1
➜ pss-components git:(feature/PSS-390/componentsUpgrades) ✗ npm pack
Expected Behavior
➜ pss-components git:(feature/PSS-390/componentsUpgrades) ✗ npm -v
8.19.3
➜ pss-components git:(feature/PSS-390/componentsUpgrades) ✗ npm pack
Steps To Reproduce
Environment
; copy and paste output from `npm config ls` here
The text was updated successfully, but these errors were encountered: