[Bug] Installer's PATH fallback tells you to run npm bin -g, removed in npm 9
#1707
Replies: 1 comment
|
Investigated this report and produced a candidate fix, validated on a fork of this repository. Root cause, fix and validation from the working notes:
Diff: awhite0030/prime-agent@main...fix-installer-npm-path-10377379710657237341 The change passes |
Uh oh!
There was an error while loading. Please reload this page.
Affected area
Installation or updates
What happened?
The installer finished, could not find
prime-agenton PATH, and printed this:npm binwas removed in npm 9.0.0 (October 2022, npm/cli#5696), so on any currently supported npm the suggested command fails:That leaves the recovery path a dead end, which is the one moment the user has nothing else to go on.
The PATH check itself was correct in my case, so this is only about the advice text.
Steps to reproduce
sh. Mine is fnm lazy-loaded from.zshrcthrough shell functions, socurl | shnever sees fnm's bin dir. Any lazy-loaded version manager or a customprefix=in~/.npmrcwill do it.curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh.npm bin -gas instructed.Unknown command: "bin".Expected behavior
The installer should print a command that works on npm 9 and newer, or better, print the resolved directory directly since the script can already compute it.
Modern equivalent:
npm prefix -g # global bin is $(npm prefix -g)/binPrime Agent version
0.8.0
Environment
Fedora 43 (Linux 7.1.8-100.fc43.x86_64), zsh, kitty 0.48.2
Additional context
The installer run under /bin/sh (bash 5.x in POSIX mode). npm 11.19.0 on Node v26.7.0 ran the install, prefix set to an fnm-managed Node v24.13.1 via npmrc.
Working around it was a one-line symlink once I knew where npm had put the binary, which
npm prefix -gtells you andnpm bin -gno longer does.All reactions