You are not logged in.
I installed nodejs, and it was working fine. I updated a couple of days ago, and now npm install and npm lead to
zsh: command not found.
Node has some naming conflicts, from what I have read. I am confused as to how the namespace for packages works, but hopefully someone can point me in the right direction with this because, while confusing, I don't think it is causing the problem. I usually execute the application as node, but it is in the repositories as nodejs. I found node in /usr/bin. I can execute npm there, but it advises that npm should be run in a normal shell with a different directory, not in /usr/bin. There was no nodejs or npm.
I removed nodejs using
pacman -Rdd nodejssince adom has dependencies, but when I tried to reinstall using
pacman -S nodejs, it said it was up to date and reinstalled. I updated my system and rebooted. I still can execute node but not the npm-it still returns
zsh: command not found: npm.
I have no idea why the node package manager disappearred. I also have no idea why it would not have reinstalled with nodejs from the repo.
➜ ~ sudo pacman -Rdd node
[sudo] password for user:
error: target not found: node➜ ~ nodejs npm
zsh: command not found: nodejs
➜ ~ node npm
module.js:338
throw err;
^
Error: Cannot find module '/home/user/npm'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3Last edited by 01010101 (2015-06-17 17:40:33)
Offline
% pkgfile npm
community/npmOnline
➜ ~ pkgfile npm
zsh: command not found: pkgfile
➜ ~ sudo pacman -S pkgfile
resolving dependencies...
looking for inter-conflicts...
Packages (1): pkgfile-15-1
Total Download Size: 0.02 MiB
Total Installed Size: 0.05 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
pkgfile-15-1-x86_64 21.6 KiB 323K/s 00:00 [######################] 100%
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
(1/1) installing pkgfile [######################] 100%
==> Run 'pkgfile --update' to initialize the database
➜ ~ pkgfile npm
error: No repo files found. Please run `pkgfile --update'.
➜ ~ pkgfile --update
error: unable to write to /var/cache/pkgfile: Permission denied
➜ ~ sudo pkgfile --update
:: Updating 4 repos...
download complete: multilib [ 224.2 KiB 372K/s 3 remaining]
download complete: core [ 608.8 KiB 536K/s 2 remaining]
download complete: extra [ 6.9 MiB 2038K/s 1 remaining]
download complete: community [ 10.9 MiB 2.55M/s 0 remaining]
:: download complete in 4.26s < 18.6 MiB 4.37M/s 4 files >
:: waiting for 1 process to finish repacking repos...
➜ ~ pkgfile npm
community/npm➜ ~ cd development/anj
➜ anj ls
app.js bin bower.json package.json public routes views
➜ anj npm install
zsh: command not found: npmOffline
pkgfile --helpOffline
I read the help page, and I am not sure if I understand what you are suggesting that I need to do. Can you be a little more explicit?
The package clearly exists-it is installed in node modules and up to date. What will pkgfile help me do?
Offline
pkgfile helps you figure out what package includes a given file.
Online
Thank you. I now see it in /var/abs/community/npm. I have no idea what to do from here out. Care to make any other suggestions? Any ideas as to why the package may be installed and updated but not execute in the shell? Does it belong somewhere other than /community? I apologize if these are ridiculous questions. I am still kind of new to Linux.
Offline
Because you have not installed it...
Offline
npm was moved into its own package, npm. The previous posters tried to explain to you how you can find out which package you need. "pkgfile npm" will tell you which package you need for a specific command.
So just install npm and you are set.
Offline
Thank you. I now see it in /var/abs/community/npm. I have no idea what to do from here out. Care to make any other suggestions? Any ideas as to why the package may be installed and updated but not execute in the shell? Does it belong somewhere other than /community? I apologize if these are ridiculous questions. I am still kind of new to Linux.
The files in /var/abs/... are part of the Arch Building System (ABS, you can read up on that here). There are no binaries in there.
However, I find it quite awkward that you managed to have the ABS package tree on your system without knowing anything about it...
Last edited by ayekat (2015-06-17 20:47:39)
Offline
npm was moved into its own package, npm. The previous posters tried to explain to you how you can find out which package you need. "pkgfile npm" will tell you which package you need for a specific command.
So just install npm and you are set.
Thank you. I did not realize this and mistakenly thought it was still a part of node. I installed npm and everything is working now.
Offline