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

Time:08-04

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.

CodePudding user response:

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
    
  • Related