skip to Main Content

CommandError:
It looks like node.js and/or npm is not installed or cannot be found.

Visit https://nodejs.org to download and install node.js for your system.

If you have npm installed and still getting this error message, set NPM_BIN_PATH variable in settings.py to match path of NPM executable in your system.

Example:
NPM_BIN_PATH = "/usr/local/bin/npm"

2

Answers


  1. In order to find out if Node is installed on your hosting environment, you can use:

    node -v

    If this returns a version, then it is an indicator that there is NodeJS installed by default. And to find out the full path to the node binary, use:

    whereis node

    OR

    which node

    Once you got the full path, define it inside the settings.py of your Django.

    However, if you still experience difficulties with that, I would strongly recommend finding a managed NodeJS web hosting provider that will natively have NodeJS and their support can help with such questions.

    Login or Signup to reply.
  2. For windows user, add

    NPM_BIN_PATH = "C:/Program Files/nodejs/npm.cmd"
    

    to settings.py

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search