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
Can't launch Directus locally #8107
Comments
The public url doesn't really change the port, but more so just for url resolution. And the reason it wasn't working (/admin) is because 8055/3055 is the API, not the APP. You should use the APP port which should be With that said, you can try to do the following: |
Also, make sure to open |
https://docs.directus.io/reference/environment-variables/#environment-variables As said in the docs, PUBLIC_URL is So if you host your project on the web and have a DNS as This means |
@azrikahar @Nitwel I followed your suggestion, but still having problems (see image above). Also @azrikahar you said "add/change these 2 env variables" but in code block i see only one. Thanks for your help :) |
@aerdnach the build chain for the app is configured to point to 8055 by default here: Line 32 in 6228257
Can you try setting the "API_URL" flag to `'http://localhost:3055/'? (I always just leave it on the defaults, so haven't really tried this 😁 ) |
I was typing the same thing :) Yes, that was the problem. Now i can reach admin/. Thanks |
@Nitwel thank you so much for this trick but how about pointing these two endpoints to the same page? |
That's just a technical limitation of Vite i'm afraid. In production mode, this is already the case 👍🏻 |
Preflight Checklist
Describe the Bug
Hi, after local install (https://docs.directus.io/contributing/running-locally/) I'm getting this error via browser when trying to visit http://localhost:3055/
{"errors":[{"message":"Route /admin doesn't exist.","extensions":{"code":"ROUTE_NOT_FOUND","stack":"Error: Route /admin doesn't exist.\n at notFound (/home/andrea/code/work/directus/api/src/controllers/not-found.ts:22:8)"}}]}
I get redirect to http://localhost:3055/admin before the error: This is my .env:
The strange thing is that I defined a custom api endpoint and it works great. I run Directus with
npm run dev
, but I get the same error if I trynpm run dev -- --scope directus --scope @directus/app
, or if i run the api before the app. Adding a / after admin won't help.I'm using mysql 8.0.26, and rc 93.
To Reproduce
Follow the Directus doc guide at https://docs.directus.io/contributing/running-locally/
What version of Directus are you using?
v9.0.0-rc.93
What version of Node.js are you using?
v16.8.0
What database are you using?
mysql
What browser are you using?
chrome
What operating system are you using?
windows
How are you deploying Directus?
locally
The text was updated successfully, but these errors were encountered: