diff --git a/reflex/config.py b/reflex/config.py index 666da9d5a..888084626 100644 --- a/reflex/config.py +++ b/reflex/config.py @@ -812,9 +812,9 @@ def get_config(reload: bool = False) -> Config: # only import the module if it exists. If a module spec exists then # the module exists. spec = find_spec(constants.Config.MODULE) - cwd = Path(os.getcwd()) + cwd = Path(os.getcwd()).resolve() if not spec or ( - spec.origin is not None and not Path(spec.origin).is_relative_to(cwd) + spec.origin is not None and not Path(spec.origin).resolve().is_relative_to(cwd) ): # we need this condition to ensure that a ModuleNotFound error is not thrown when # running unit/integration tests.