Skip to content

[BUG] npm breaks on Windows when running off a UNC path #3349

@Stanzilla

Description

@Stanzilla

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion> npm install
'\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm WARN saveError EPERM: operation not permitted, open 'C:\Windows\package-lock.json.415733530'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\package.json'

See #1189 for more info

Expected Behavior

install works

Steps To Reproduce

  1. npm install

Same as:

Environment

  • OS: Windows 10
  • Node: v16
  • npm: v7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions