Skip to content

[BUG] Invalid package name ".DS_Store" #7492

Closed
@xiaozhuai

Description

@xiaozhuai

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

Exec npm update -g.

npm error code EINVALIDPACKAGENAME
npm error Invalid package name ".DS_Store" of package ".DS_Store@*": name cannot start with a period.

npm error A complete log of this run can be found in: /Users/xiaozhuai/.cache/npm/_logs/2024-05-09T05_40_34_718Z-debug-0.log

2024-05-09T05_40_34_718Z-debug-0.log

If I remove .DS_Store with rm /opt/node/npm/lib/node_modules/.DS_Store, then it works.
I am on macOS, and I've set prefix=/opt/node/npm in .npmrc.

Environment

  • npm: 10.7.0
  • Node.js: v18.19.1
  • OS Name: macOS 14.4.1
  • System Model Name: MacBook Pro Apple M3 Max
  • npm config:
; "builtin" config from /opt/node/npm/lib/node_modules/npm/npmrc

; prefix = "/opt/homebrew" ; overridden by user

; "user" config from /Users/xiaozhuai/.npmrc

//registry.npmjs.org/:_authToken = (protected)
cache = "/Users/xiaozhuai/.cache/npm"
prefix = "/opt/node/npm"
strict-ssl = false

; node bin location = /opt/node/node/bin/node
; node version = v18.19.1
; npm local prefix = /opt
; npm version = 10.7.0
; cwd = /opt
; HOME = /Users/xiaozhuai

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions