'node-red' is not recognized as an internal or external command after npm install

Hey everyone! I've been trying to install node-red on a windows pc. After 'install -g --unsafe-perm node-red' the node-red package was downloaded under /node_modules directory but when I tried to run 'node-red' in Node.js command prompt, the window returns ''node-red' is not recognized as an internal or external command, operable program or batch file.'

These are the messages that came up during installation:
npm WARN deprecated mailparser@0.6.2: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained

> bcrypt@2.0.1 install C:\Users\sesa525401\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(407): https://github.com/kelektiv/node.bcrypt.js/releases/download/v2.0.1/bcrypt_lib-v2.0.1-node-v64-win32-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for bcrypt@2.0.1 and node@10.15.1 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\sesa525401\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\sesa525401\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd C:\Users\sesa525401\node_modules\bcrypt
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\sesa525401\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\sesa525401\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\sesa525401\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sesa525401\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\sesa525401\node_modules\bcrypt
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\sesa525401\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\sesa525401\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN sesa525401@1.0.0 No description
npm WARN sesa525401@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 (node_modules\bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@2.0.1 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ node-red@0.19.5
added 327 packages from 307 contributors and audited 1025 packages in 155.645s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details    

Environmental variables:
C:\Users\sesa525401>echo %PATH%
C:\Users\sesa525401\AppData\Roaming\npm;C:\Program Files\nodejs;

It seems the required packages are in place but I couldn't run node-red. Does anyone have an idea what would be causing this? Thank you!

The first thing to note is that I don't think you have installed all of the pre-requisites.

You need to install build-essentials for Windows otherwise modules/packages that need a compile step cannot be compiled. That accounts for some of the error messages you are seeing.

Also make sure that node and npm are in the path in the command/powershell shell you are starting Node-RED from.