Fix pnpm Install: Unsafe Plugin Manifest Path
Jump to Fix
Running pnpm install -g openclaw can fail with an "unsafe plugin manifest path" error. This happens because pnpm's security model rejects plugin manifests written outside its own global store. Here are three ways to fix it.
ERR_PNPM_UNSAFE_PATH The plugin manifest path is not inside the pnpm store. The following path is unsafe: /Users/you/.openclaw/plugins/manifest.json
Next Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Fix 1: Use npm Instead (Recommended)
OpenClaw officially recommends npm for global installation. npm does not have pnpm's manifest path restriction and works on all platforms without extra configuration.
# Uninstall any partial pnpm install first pnpm remove -g openclaw 2>/dev/null || true # Install with npm npm install -g openclaw # Verify openclaw --version
Having both npm and pnpm installed is fine. OpenClaw uses npm for its own plugin management internally regardless of how it was installed.
Fix 2: Configure the pnpm Global Directory
If you prefer pnpm, you can point its global store to a standard location that satisfies the manifest path check:
# Set global dir to a predictable path pnpm config set global-dir "$HOME/.pnpm-global" pnpm config set global-bin-dir "$HOME/.pnpm-global/bin" # Add bin dir to PATH (add this to ~/.zshrc or ~/.bashrc) export PATH="$HOME/.pnpm-global/bin:$PATH" # Reload shell, then install pnpm install -g openclaw
Fix 3: Allow with --unsafe-perm (Quick Fix)
The --unsafe-perm flag tells pnpm to skip the manifest path validation and run postinstall scripts without additional sandboxing. Use this only on personal machines.
pnpm install -g --unsafe-perm openclaw
Avoid --unsafe-perm on shared servers or CI environments. Use Fix 1 or Fix 2 in those contexts.
Verify the Installation
openclaw --version openclaw gateway status npx clawkit-doctor@latest
Installed but Gateway won't start?
Fix It Faster With Our Tools
Did this guide solve your problem?