-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yarn dev: Error: Must provide a proper URL as target at ProxyServer.<anonymous> #6567
Comments
Hello, The error you're encountering indicates that the frontend development server's proxy configuration lacks a proper target URL. This usually happens when the backend server is not running or the proxy settings are incorrect. Step 1: Start the Backend Server
By default, this will start the server at Step 2: Verify the Backend Server is Running
Step 3: Check Frontend Proxy Configuration
Thank you,
|
Hi, I followed your instruction and added I can confirm that the drango backend is running as the UI shows up when visiting I also tried running the django backend and yarn dev from a mac, and get the same errors. |
so, how do you solve this? I have the same question~ thanks! |
having the same issue. even on windows or linux (wsl) |
having the same issue in mac . |
I'm having the same issue. |
Any update on this? I have the same problem |
I solved the problem by updating the devServer.proxy option in the webpack.config.js file like this:
{
host: "127.0.0.1",
// Port for the Webpack dev server
port: HMR_PORT,
// Enable HMR
hot: true,
// Allow cross-origin requests from Django
headers: { "Access-Control-Allow-Origin": "*" },
static: {
directory: path.resolve(__dirname, "../label_studio/core/static/"),
publicPath: "/static",
},
devMiddleware: {
publicPath: `${FRONTEND_HOSTNAME}/react-app/`,
},
allowedHosts: "all", // Allow access from Django's server
proxy: {
'/api': {
target: `${DJANGO_HOSTNAME}/api`,
changeOrigin: true,
pathRewrite: { '^/api': '' },
secure: false,
},
'/': {
target: `${DJANGO_HOSTNAME}`,
changeOrigin: true,
secure: false,
}
},
}
|
thanks, it works! |
Please try out max82645235 solution and if there are still issues, please let us know. We will try to simplify this. Thank you,
|
Describe the bug
In
yarn dev
mode, openinghttp://localhost:8010/
run intoTo Reproduce
Steps to reproduce the behavior:
Download latest dev branch. Following the READM.md in under
web
folder https://github.com/HumanSignal/label-studio/blob/0f5a47873a24080f74e3edf50cf3cbee96ef98a0/web/README.md#installation-instructionscreate the .env (with the same content as .env.development
From the
web
directory: Runyarn dev
and wait tillExpected behavior
yarn dev should result in working frontend session, and
http://localhost:8010
should show the label-studio UIEnvironment (please complete the following information):
The text was updated successfully, but these errors were encountered: