When running nicegui under pyenv environment `vue_filepath` is constructed incorrectly - it replaces default pyenv root `.pyenv` to `.jsenv`. The fix is just replace extension, not whole path.
@@ -34,7 +34,7 @@ class CustomView(jp.JustpyBaseComponent):
@staticmethod
def use(py_filepath: str, dependencies: List[str] = []):
- vue_filepath = os.path.realpath(py_filepath).replace('.py', '.js')
+ vue_filepath = os.path.splitext(os.path.realpath(py_filepath))[0] + '.js'
for dependency in dependencies:
is_remote = dependency.startswith('http://') or dependency.startswith('https://')