Installing npm returns error 'pacman' failed to install missing dependencies

trying to install npm
getting this from the terminal
what can I do to install npm?
thanks

sudo pacman -S npm
resolving dependencies...
looking for conflicting packages...

Packages (6) c-ares-1.17.2-1  node-gyp-8.2.0-1  nodejs-16.11.1-1  nodejs-nopt-5.0.0-2  semver-7.3.5-2  npm-8.0.0-1

Total Download Size:    2.58 MiB
Total Installed Size:  41.40 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 npm-8.0.0-1-any.pkg.tar.zst failed to download
 Total (1/5)                                               2.6 MiB  3.94 MiB/s 00:01 [-------------------------------------------------] 100%
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirror.netweaver.uk : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirror.netweaver.uk : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from lon.mirror.rackspace.com : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirrors.melbourne.co.uk : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from www.mirrorservice.org : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirror.bytemark.co.uk : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirrors.melbourne.co.uk : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirrors.manchester.m247.com : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from archlinux.uk.mirror.allworldit.com : The requested URL returned error: 404
error: failed retrieving file 'npm-8.0.0-1-any.pkg.tar.zst' from mirror.bytemark.co.uk : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.
1 Like

Update your mirrors with the welcome app. Then try again.

4 Likes

done the mirror update with the welcome app.
same result as before.

Terminal output please, as before.

The latest version is 8.1.0-1

If you indeed get failure because its downloading version 8.0.0, then the mirrors are still wrong.

2 Likes

Perhaps
sudo pacman -Syyu npm
?

This (-yy) should force a refresh of all package databases (needed usually after updating the mirrors), update the system and install npm.

1 Like

Did you update your system? Or did you update your mirrors? Very specifically describe what you did.

Thanks for replies.
So initially I updated only mirrors and it didn’t seem to fix the issue.
Now that I updated the system things are fine.
Thanks.
P.s
My issue with no password requested when waking from suspend is still not fixed.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.