Unable to use npm installed global package

Hello all!

I’m running into an issue where I’m unable to run NPM packages. I’m running

npm i -g express

but when I try to run express, I’m unable to run it. Running

which node
which npm

I get

/usr/bin/node
/usr/bin/npm

Has anyone run into this before?

EDIT:

I’m running into the same issue with nodemon which, from what I can tell, should be runnable from the terminal.

npm i -g nodemon
$ nodemon
> zsh: command not found: nodemon

Use a node version manager.

If you choose to use sudo npm install there is a high probability you will get fileconflict when running pacman -Syu

You Can try nvm. It does not need root permission and can install multiple versions of node.

without a copy of your error, it is difficult to answer … (with “-g”) maybe you forget sudo
ps: exists aur nodejs-express

You problem is how to run express et not to install it?
express is a framework for node dev, not an application doc


Exists also in aur nodejs-express-generator with this package we have a cli app for generate code source (you find this ?)

If you choose to use sudo npm install there is a high probability you will get fileconflict when running pacman -Syu

I’m not using sudo npm install? I’m just using the -g flag

Use a node version manager.

Thank you! I’ll be sure to use it

Gotcha! Yeah, the issue is that there is no error… It’s just when I try to run

$ express
> zsh: command not found: express

When installing another app (I’ve reflected the change in the question)

$ nodemon
> zsh: command not found: nodemon

is in my prev post : express not have command “express”, this command is in express-generator
is not a manjaro issue, at you to read the doc :wink:


as express, for nodemon : use aur nodejs-nodemon

Yeah, I did npm install -g express-generator and no dice. I’m trying to run express or express-generator as is listed in the doc you linked but it’s still telling me that there is no command


Right, sure, I can install via aur but why can’t I use the npm installed package? What happens if I stumble on a package that isn’t on AUR? That’s my main concern, not whether I can just install it from npm…


For example, I’m trying to install joi - schema validation, but it’s not in the AUR. Maybe I’m misunderstanding what you’re saying?