From 853b4aa856a05f3a073b3446471a03dd8f9f801e Mon Sep 17 00:00:00 2001 From: "Y.D.X" <73375426+YDX-2147483647@users.noreply.github.com> Date: Thu, 27 Jul 2023 23:31:46 +0800 Subject: [PATCH] Add instructions on setting `NPM_BIN_PATH` on Windows --- docs/installation.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index db01e06..00162a1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -181,11 +181,17 @@ this case, you need to set the path to the `npm` executable in *settings.py* fil NPM_BIN_PATH = '/usr/local/bin/npm' ``` -On *Windows* it might look like this: +On *Windows*, you may have npm on `$PATH` but it's `npm.cmd` rather than `npm`. If so, please override the default `NPM_BIN_PATH = 'npm'`: + +```python +NPM_BIN_PATH = 'npm.cmd' +``` + +Alternatively, you can also set the full path to `npm.cmd`. It might look like this: ```python NPM_BIN_PATH = r"C:\Program Files\nodejs\npm.cmd" ``` Please note that the path to the `npm` executable may be different for your system. To get the `npm` path, try running -the command `which npm` in your terminal. +the command `which npm` in your terminal. (On *Windows*, please try `where npm` or `Get-Command npm`)