Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExpressJS Installation

so I did npm install express according to the tutorial, after installing express I did

'express --version' 

and express is not in my path. I am wondering what I did wrong or is there any way to test if express works on my OS.

like image 711
ericraio Avatar asked Aug 23 '26 23:08

ericraio


1 Answers

Did you use npm install express or npm install express -g?

The second command is what you should use if you want to use the express program from the command line. The -g option installs the library globally.

The first command will just install the library in a node_modules subfolder, and you would need to explicitly locate the program before using it, eg. node ./node_modules/express/bin/express (I'm not sure if that's the right command, just an example).

like image 183
Andz Avatar answered Aug 25 '26 12:08

Andz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!