use system npm when REFLEX_USE_SYSTEM_NODE is passed (#4133)

This commit is contained in:
Khaleel Al-Adhami 2024-10-08 13:25:49 -07:00 committed by GitHub
parent cb4ff24dc0
commit c619c72211
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,7 +196,7 @@ def get_npm_path() -> str | None:
The path to the npm binary file.
"""
npm_path = Path(constants.Node.NPM_PATH)
if not npm_path.exists():
if use_system_node() or not npm_path.exists():
return str(which("npm"))
return str(npm_path)