-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 get plugin working with DDEV - 502 Unresponsive/broken ddev back-end site. #36
Comments
This is not an issue with the Craft Vite plugin. I'd suggest looking at existing setups that work, here are two: DDEV: https://github.com/onedarnleyroad/craftcms Docker: https://github.com/nystudio107/craft Also a course on DDEV from CraftQuest.io: https://craftquest.io/courses/ddev-and-craft-cms-quick-start-guide |
I figured it probably wasn't an issue with this plugin, which is why I opened it as a question rather than bug. I was just curious if anything might have jumped out to someone experienced as being out of line, especially regarding where the bad gateway is coming from or why In the meantime I'll keep digging into the documentation. |
Yeah sorry, I don't use DDEV so I can't really help you with some of the DDEV particular issues, other than point you at example setups that work. If I had to guess, it'd be that a port hasn't been opened on the DDEV end of things or such. |
For anyone who comes across this later.... I did get it working by following the CraftQuest video, though I don't know which config was specifically the problem. Here are the changes I made:
|
@acalvino4 are you running Vite 3 ? Since I upgraded to vite 3 I have the exact same issue @khalwat |
@kevinmu17 please see this ticket: #37 |
Question
I have spent hours pouring over all the documentation I can find, tweaking parameters, but cannot seem to get my Vite server running within my DDEV environment.
I have successfully run
npm run dev
/vite
both on local and within my container. However, any url of the form127.0.0.1:3000/...
returns a 502, as doescraft.ddev.site:3000/...
. This happens whether I load the url manually or through twig:{{ craft.vite.script("src/ts/index.ts") }}
. The markup generated by this tag seems to be correct:<script type="module" src="https://craft.ddev.site:3000/src/ts/index.ts"></script>
Also, I have confirmed through
{{ craft.vite.devServerRunning() }}
that the dev server is running, though if i make'checkDevServer' => true,
, the devServerRunning tag says that it's not. So not sure what to make of that. Anyway, below are my configs - let me know if something seems off, and Thanks!vite.php
vite.config.js
docker-compose.vite.yaml
src/ts/index.ts
The text was updated successfully, but these errors were encountered: