Skip to content

NVM blocked package-manager execution because the Node.js directory is unsafe #1389

Description

@jtabox
❯ npm ls -g
NVM blocked package-manager execution because the Node.js directory is unsafe.

Path: C:\Progs\nvm\envs\v24.16.0
Reason: Directory is writable by other users.
Action: Reinstall this version into a private install root.
If this change was unexpected, contact your administrator and review NVM event logs.
Event code: NVM4305

❯ nvm list
  26.8.1
* 24.16.0  (default)

❯ nvm --version
v2.0.0

❯ nvm doctor
Verify cache
  Pubkey     : present (C:\Progs\nvm\.verify\pubkey.cer)
  HKCU cache : 3 entries at HKCU\Software\Author Software\Preferences\nvm\VerifyCache
    - C:\Progs\nvm\envs\v26.8.1\node.exe
    - C:\Progs\nvm\envs\v24.16.0\node.exe
  Mode       : accelerated (pubkey + HKCU cache)

Runtime ACLs
  InstallRoot: C:\Progs\nvm\envs
  DataRoot   : C:\Progs\nvm
  ShimDir    : C:\Progs\nvm\.shim
  Proxy      : C:\Progs\nvm\proxy.exe
  Tip        : run elevated `nvm doctor --autofix` to re-lock .shim/proxy DACLs
No checks directory found.

❯ gsudo nvm doctor --autofix
Verify cache
  Pubkey     : present (C:\Progs\nvm\.verify\pubkey.cer)
  HKCU cache : 3 entries at HKCU\Software\Author Software\Preferences\nvm\VerifyCache
    - C:\Progs\nvm\envs\v26.8.1\node.exe
    - C:\Progs\nvm\envs\v24.16.0\node.exe
  Mode       : accelerated (pubkey + HKCU cache)

Runtime ACLs
  InstallRoot: C:\Progs\nvm\envs
  DataRoot   : C:\Progs\nvm
  ShimDir    : C:\Progs\nvm\.shim
  Proxy      : C:\Progs\nvm\proxy.exe
  Repair     : re-applied managed DACLs and re-locked shim/proxy
No checks directory found.

❯ npm ls -g
NVM blocked package-manager execution because the Node.js directory is unsafe.

Path: C:\Progs\nvm\envs\v24.16.0
Reason: Directory is writable by other users.
Action: Reinstall this version into a private install root.
If this change was unexpected, contact your administrator and review NVM event logs.
Event code: NVM4305

I'm the only user in my PC, and the folder has the usual windows permissions, my user, Administrators, SYSTEM, and CREATOR OWNER

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions