bash: /usr/bin/express: /usr/bin/nodejs: bad interpreter: No such file or directory


i am trying to make template using this command –

express -e project-name

in node_modules – express and express-generator are both installed, i checked.

Also express --help does not work and writes same error.


Okay, i fixed this and if somebody ever will have this question here is answer:

  1. delete node and reinstall it with npm globally.

  2. run all of these 3 commands in terminal

    npm set prefix ~/.npm
  3. next install

    npm install -g express
    npm install -g express-generator

Answered By – Teodora-techie

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published