Django-tailwind not finding npm

I've been trying to install django-tailwind, using a windows computer, and I'm having trouble with the python manage.py tailwind install command.

No matter what I try, I get this error:

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"

I have added NPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd" to settings.py, which is the path to it. I tried r"C:/Program Files/nodejs/npm.cmd", 'C:\\Program Files\\nodejs\\npm.cmd', and even PurePosixPath(PureWindowsPath(r"C:/Program Files/nodejs/npm.cmd")). None work. I get the path from entering where npm.cmd on the command line, and I have verified it by going to that directory.

What might be the problem?

Back to Top