2.2 KiB
Migrating from npm global tool to binary installation
If you previously installed safe-chain as an npm global package, you need to migrate to the binary installation.
Depending on the version manager you're using, the uninstall process differs:
Standard npm (no version manager)
-
Clean up shell aliases:
safe-chain teardown -
Restart your terminal
-
Uninstall the npm package:
npm uninstall -g @aikidosec/safe-chain -
Install the binary version (see Installation)
nvm (Node Version Manager)
Important: nvm installs global packages separately for each Node version, so safe-chain must be uninstalled from each version where it was installed.
-
Clean up shell aliases:
safe-chain teardown -
Restart your terminal
-
Uninstall from all Node versions:
Option A - Automated script (recommended):
for version in $(nvm list | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'); do nvm use $version && npm uninstall -g @aikidosec/safe-chain; doneOption B - Manual per version:
nvm use <version> npm uninstall -g @aikidosec/safe-chainRepeat for each Node version where safe-chain was installed.
-
Install the binary version (see Installation)
Volta
-
Clean up shell aliases:
safe-chain teardown -
Restart your terminal
-
Uninstall the Volta package:
volta uninstall @aikidosec/safe-chain -
Install the binary version (see Installation)
Troubleshooting
Shell aliases still present after migration
- Run
safe-chain teardown(if the binary is installed) - Manually remove any safe-chain entries from your shell config files:
- Bash:
~/.bashrc - Zsh:
~/.zshrc - Fish:
~/.config/fish/config.fish - PowerShell:
$PROFILE
- Bash:
- Restart your terminal
- Re-run the install script
"command not found: safe-chain" after migration
The binary installation directory (~/.safe-chain/bin) may not be in your PATH. Restart your terminal. If the problem persists: re-run the installation of safe-chain.