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] npm pack not working with chokidar in bundledDependencies #5924

Closed
2 tasks done
mibux opened this issue Dec 7, 2022 · 0 comments · Fixed by npm/npm-packlist#150 · May be fixed by InfiniteLove2020/node#5
Closed
2 tasks done

[BUG] npm pack not working with chokidar in bundledDependencies #5924

mibux opened this issue Dec 7, 2022 · 0 comments · Fixed by npm/npm-packlist#150 · May be fixed by InfiniteLove2020/node#5
Labels
Bug thing that needs fixing platform:windows is Windows-specific Priority 2 secondary priority issue Release 9.x work is associated with a specific npm 9 release

Comments

@mibux
Copy link

mibux commented Dec 7, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

"npm pack" fails with an error while chokidar is included in bundledDependencies in the package.json

Expected Behavior

npm pack should pack chodikar into the archive

Steps To Reproduce

  1. create new folder an cd into it
  2. npm init -y
  3. npm install chokidar
  4. Add "chokidar" as bundledDependencies to package.json
  5. npm install -g npm@next-8
  6. npm pack --dry-run /* Works fine */
  7. npm install -g npm@latest /* As of now version 9.1.3*/
  8. npm pack --dry-run /* Fails */

Error message in the log file reads as this:

36 verbose stack TypeError: Cannot read properties of null (reading 'path')
36 verbose stack     at PackWalker.gatherBundles (C:\Users\<USER>\AppData\Roaming\npm\node_modules\npm\node_modules\npm-packlist\lib\index.js:387:25)
37 verbose cwd <CWD>
38 verbose Windows_NT 10.0.19044
39 verbose node v16.18.1
40 verbose npm  v9.1.3
41 error Cannot read properties of null (reading 'path')
42 verbose exit 1
43 timing npm Completed in 82ms
44 verbose unfinished npm timer command:pack 1670409046230
45 verbose code 1
46 error A complete log of this run can be found in:
46 error     C:\Users\<USER>\AppData\Local\npm-cache\_logs\2022-12-07T10_30_46_201Z-debug-0.log

Environment

  • npm: 9.1.3
  • Node.js: v16.18.1
  • OS Name: Windows_NT 10.0.19044 (Windows 10 Pro)
  • System Model Name:
  • npm config:
prefix = "C:\\Users\\<User>\\AppData\\Roaming\\npm"
location = "project"
@mibux mibux added Bug thing that needs fixing Needs Triage needs review for next steps Release 9.x work is associated with a specific npm 9 release labels Dec 7, 2022
@nlf nlf added platform:windows is Windows-specific Priority 2 secondary priority issue and removed Needs Triage needs review for next steps labels Dec 7, 2022
nlf added a commit to npm/npm-packlist that referenced this issue Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing platform:windows is Windows-specific Priority 2 secondary priority issue Release 9.x work is associated with a specific npm 9 release
Projects
None yet
2 participants