ujust update npm failing

ujust update
── 18:10:31 - Node Package Manager ─────────────────────────────────────────────
npm error code EEXIST
npm error syscall symlink
npm error path ../../../lib/node_modules/npm/man/man5/package-json.5
npm error dest /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error errno -17
npm error EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man5/package-json.5' -> '/var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5'
npm error File exists: /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /home/n1ete/.npm/_logs/2024-10-02T16_10_31_775Z-debug-0.log
npm failed:
0: Command failed: `/home/linuxbrew/.linuxbrew/bin/npm update '--location=global'`
1: `/home/linuxbrew/.linuxbrew/bin/npm` failed: exit status: 239

Location:
src/steps/node.rs:102
Retry? (y)es/(N)o/(s)hell/(q)uit
── 18:10:31 - Node Package Manager ─────────────────────────────────────────────
npm error code EEXIST
npm error syscall symlink
npm error path ../../../lib/node_modules/npm/man/man5/package-json.5
npm error dest /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error errno -17
npm error EEXIST: file already exists, symlink '../../../lib/node_modules/npm/man/man5/package-json.5' -> '/var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5'
npm error File exists: /var/home/linuxbrew/.linuxbrew/share/man/man5/package-json.5
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: /home/n1ete/.npm/_logs/2024-10-02T16_10_31_775Z-debug-0.log
npm failed:
0: Command failed: `/home/linuxbrew/.linuxbrew/bin/npm update '--location=global'`
1: `/home/linuxbrew/.linuxbrew/bin/npm` failed: exit status: 239

Location:
src/steps/node.rs:102
Retry? (y)es/(N)o/(s)hell/(q)uit
deleting the symbolic link doesnt help, any idea whats causing this and how to fix?
Solution:
Either run /home/linuxbrew/.linuxbrew/bin/npm update '--location=global' --force or just disable npm update from topgrade
Jump to solution
6 Replies
n1ete
n1eteOP2mo ago
are npm packages installed via brew?
Solution
asen23
asen232mo ago
Either run /home/linuxbrew/.linuxbrew/bin/npm update '--location=global' --force or just disable npm update from topgrade
Aru
Aru2mo ago
I usually install node and npm with nvm I would say uninstall the brew version, and use nvm instead. But that's up to you
asen23
asen232mo ago
Yeah the brew one seems borked but some formulae depend on npm
n1ete
n1eteOP2mo ago
i installed jsonlint with brew which has node as dependency, deleted the linter and all is fine again....so how would i install severall linters on atomic distros?
asen23
asen232mo ago
brew is not bad method, just disable npm update also if you are using it for dev, maybe consider distrobox
Want results from more Discord servers?
Add your server