Teodora-techie
Teodora-techie

Reputation: 91

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.

Upvotes: 1

Views: 1974

Answers (1)

Teodora-techie
Teodora-techie

Reputation: 91

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
    PATH="$HOME/.npm/bin:$PATH"
    PATH="./node_modules/.bin:$PATH"
    
  3. next install

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

Upvotes: 3

Related Questions