Distribution / lib files missing since 1.14.0
Describe the bug
Since the release of 1.14.0, the web/dist/libs/editor and web/dist/libs/datamanager directories in the releases are empty.
1.14.0:
1.13.1:
This is also to be seen in the file size of the archives which can be downloaded:
1.14.0:
1.13.1:
Is there a reason why all the lib assets are not shipped anymore with the release?
Hi there!
Thanks for reporting this! After discussing this with our engineering team, they were interested in your usecase. These files were removed as part of a change to the infrastructure of the package, which ultimately reduced the package size by about 20MB, as we moved it into a monorepo approach. Can you describe what you were utilizing those files for?
Thanks,
Tyler Conlee Head of Support HumanSignal
Comment by Tyler Conlee Workflow Run
Hi @heidi-humansignal,
Thank you for your message!
We use the stand alone editor in one of our projects, and we directly include these built assets from the lib/editor directory:
<html>
...
<script src="main.js"></script>
<link rel="stylesheet" href="main.css">
...
</html>
Then we can directly use the editor by using the following (as in the documentation) without any frontend building:
var labelStudio = new LabelStudio("editor", options);
I'd happy to know how this should be done now (and this might be useful to add in the documentation?)
So after diving into the source code / project I managed to build a stand-alone version of the editor myself with the following command:
~/Dev/label-studio/web((1.14.0.post0))$ MODE=standalone npx nx run editor:build:production
I then needed to copy the following files:
- dist/libs/editor/715.js
- dist/libs/editor/743.js
- dist/libs/editor/main.js
- dist/libs/editor/main.css
And include the js as a module:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="./main.css">
</head>
<body>
<div id="lsf"></div>
<script type="module">
const labelStudio = new LabelStudio("lsf", {...});
</script>
<script src="./main.js" type="module"></script>
</body>
</html>
So without the library files inside the package, is this the "new supposed way" to do it? I've seen the lsf:serve command in package.json is doing something similar for booting up a LSF standalone editor:
FRONTEND_HOSTNAME=http://localhost:3000 MODE=standalone nx run editor:serve:development
If this makes sense, could we add a lsf:build command to package.json so this is at least a sort of "known" command?
Hi there!
I'll pass that feedback along to the team internally! Should our product team decide to move forward with your suggestion, we'll keep you informed of any updates. Please be aware that submitting a request does not ensure its implementation or a quick turnaround time. We appreciate your understanding and support.
Thanks,
Tyler Conlee Head of Support HumanSignal
Comment by Tyler Conlee Workflow Run
This is also happening to me.
build from source using:
git clone https://github.com/HumanSignal/label-studio.git cd label-studio git checkout tags/1.17.0 -b label-studio-1.17.0
-
install dependencies pip install poetry poetry install
-
run db migrations poetry run python label_studio/manage.py migrate
-
collect static files poetry run python label_studio/manage.py collectstatic
-
start the server in development mode at http://localhost:8080 poetry run python label_studio/manage.py runserver
**After creating a file it shows **
[2025-04-24 21:46:35,356] [django.security.SuspiciousFileOperation::response_for_exception::124] [ERROR] The joined path (/631.js) is located outside of the base path component (/home/vitor/Documents/WIKKI/fossiles/label-studio/label-studio/label-studio/web/dist/apps/labelstudio) File "/home/vitor/Documents/WIKKI/fossiles/label-studio/label-studio/label-studio/label_studio/core/utils/static_serve.py", line 59, in serve fullpath = Path(safe_join(document_root, possible_asset)) File "/home/vitor/Documents/WIKKI/fossiles/label-studio/.venv/lib/python3.10/site-packages/django/utils/_os.py", line 31, in safe_join raise SuspiciousFileOperation( django.core.exceptions.SuspiciousFileOperation: The joined path (/631.js) is located outside of the base path component (/home/vitor/Documents/WIKKI/fossiles/label-studio/label-studio/label-studio/web/dist/apps/labelstudio)
I exactly encountered the same error @vitorpmh, Can you explain how you solved it, if you did?
I could not solve it. Just used the docker version.
I get this error as well with main.js:
django.core.exceptions.SuspiciousFileOperation: The joined path (/main.js) is located outside of the base path component (/home/ubuntu/src/label-studio/web/dist/apps/labelstudio)
[2025-06-24 11:24:03,695] [django.security.SuspiciousFileOperation::response_for_exception::124] [ERROR] The joined path (/main.js) is located outside of the base path component (/home/ubuntu/src/label-studio/web/dist/apps/labelstudio)
Traceback (most recent call last):
File "/home/ubuntu/miniforge3/envs/label-studio/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniforge3/envs/label-studio/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniforge3/envs/label-studio/lib/python3.11/site-packages/sentry_sdk/integrations/django/views.py", line 90, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/src/label-studio/label_studio/core/utils/static_serve.py", line 59, in serve
fullpath = Path(safe_join(document_root, possible_asset))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/miniforge3/envs/label-studio/lib/python3.11/site-packages/django/utils/_os.py", line 31, in safe_join
raise SuspiciousFileOperation(
django.core.exceptions.SuspiciousFileOperation: The joined path (/main.js) is located outside of the base path component (/home/ubuntu/src/label-studio/web/dist/apps/labelstudio)
after running label-studio locally with:
install dependencies
pip install poetry
poetry install
run db migrations
poetry run python label_studio/manage.py migrate
collect static files
poetry run python label_studio/manage.py collectstatic
start the server in development mode at http://localhost:8080/
poetry run python label_studio/manage.py runserver
I have the same error exactly , do you @maerteijn @poppingtonic have resolved it ?