user762579
user762579

Reputation:

node.js and express -bash: /usr/bin/express: No such file or directory

I started a Digital Ocean droplet from the node.js image ( w ubuntu 14.04) checking it, I get :

$ node -v
  v4.3.0

Then , I tried to install the latest version of express.js :

    $ sudo npm install -g express
    [email protected] /usr/lib/node_modules/express
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected])
    └── [email protected] ([email protected], [email protected])

but when I check express version , I get an error :

  $ express -v
 -bash: /usr/bin/express: No such file or directory

what could be wrong ? thanks for feedback

UPDATE ---

I uninstalled& reinstalled node.js :

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodes
$ node -v
v4.3.1

but same issue

sudo npm install -g express [email protected] /usr/lib/node_modules/express ... $ express -v -bash: /usr/bin/express: No such file or directory

Upvotes: 1

Views: 3133

Answers (1)

loadaverage
loadaverage

Reputation: 1035

Check that /usr/lib/node_modules/express is present in your PATH variable.

echo $PATH will print current PATH

Also, maybe you dint install express-generator?

Upvotes: 1

Related Questions