attempt to fix usage when volta is installing node

This commit is contained in:
Lendemor 2025-01-20 15:44:52 +01:00
parent 4da32a122b
commit b12d1d6e82

View File

@ -243,7 +243,9 @@ def get_package_manager(on_failure_return_none: bool = False) -> str | None:
"""
npm_path = path_ops.get_npm_path()
if npm_path is not None:
return str(Path(npm_path).resolve())
if constants.IS_WINDOWS:
return str(Path(npm_path).resolve())
return npm_path
if on_failure_return_none:
return None
raise FileNotFoundError("NPM not found. You may need to run `reflex init`.")