cli
cli copied to clipboard
[BUG] npm install throws "ERR_INVALID_ARG_TYPE" if empty yarn.lock folder is present in root directory.
Is there an existing issue for this?
- [x] I have searched the existing issues
This issue exists in the latest npm version
- [x] I am using the latest npm
Current Behavior
npm install
npm error code ERR_INVALID_ARG_TYPE
npm error The "path" argument must be of type string or an instance of Buffer or URL. Received null
npm error A complete log of this run can be found in: /Users/nparoski/.npm/_logs/2025-11-26T10_05_44_942Z-debug-0.log
Expected Behavior
Expected to install packages without issues.
Steps To Reproduce
npm initnpm install <package name>mkdir yarn.locknpm install
Environment
- npm: 10.9.0
- Node.js: 22.10.0
- OS Name: MacOS / Ubuntu
- System Model Name: macOS Sequoia / Ubuntu 22
- npm config:
; node bin location = /Users/nparoski/.nvm/versions/node/v22.10.0/bin/node
; node version = v22.10.0
; npm local prefix = /Users/nparoski/projects/npm-test
; npm version = 10.9.0
; cwd = /Users/nparoski/projects/npm-test
; HOME = /Users/nparoski
; Run `npm config ls -l` to show all defaults.```
#8553
#8772