Closed
Description
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
- create new folder an cd into it
- npm init -y
- npm install chokidar
- Add "chokidar" as bundledDependencies to package.json
- npm install -g npm@next-8
- npm pack --dry-run /* Works fine */
- npm install -g npm@latest /* As of now version 9.1.3*/
- 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"