HumanSignal / HumanSignal/label-studio

Frontend build -> LabelStudio is not defined

Open
#6,387 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

I do changes just to use ImageBbox and I can see changes in development, but after run yarn build and using build files in own project console shows error:
LabelStudio is not defined

**To Reproduce**
Steps to reproduce the behavior:
1. create .env
FRONTEND_HMR=true
FRONTEND_HOSTNAME=http://localhost:8010
DJANGO_HOSTNAME=http://localhost:8080
2. cd web
run yarn install --frozen-lockfile
run yarn lsf:watch
run yarn lsf:serve

3. go to 'web/libs/editor/src/env/development.js' and set ImageBbox.
const data = ImageBbox;

4. Go to 'http://localhost:3000/' to se changes.

5. run yarn build

6. copy build files from web/dist/libs/editor to own new project. Start live server.
7. Go to live server http://localhost:5500/editor/
8. And see error:
editor/:280 Uncaught ReferenceError: LabelStudio is not defined

Same error if try to use in React...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.