Skip to content
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

(related to @2968)Add trouble shooting section and container section to your documentation for faster start. #7007

Closed
4 tasks done
frog-o opened this issue Feb 20, 2022 · 1 comment

Comments

@frog-o
Copy link

frog-o commented Feb 20, 2022

Clear and concise description of the problem

Even thought I found issue #2968 vite always refresh and connecting

I could not commit this issue there because it is locked.

I had many problems due to running inside a container and programing from a remote location.(see here

The last one being in my config

server: {
watch: {usePolling: true},
hmr:{clientPort:TOClientPort},
strictPort: true
}

I spent many hours trying to figure out what need to git this going. I need to change clientPort to port in this case as well as some other settings.

IMHO A lot of time was waisted because a lack of troubleshooting section. I feel every good program has one And yes this not your fault( I have a problem with comprehension), this type of thing make for a much more welcoming experience.

While default work great for those who are typical it is always nice to address those who are not typical.

Suggested solution

The documentation I would like to see would be something like this

When running vite in a container

when running vite inside a container you might have to adjust so settings

some typical one are

server: {
port:14500, //the port you want to use
host : localhost, //set to "0.0.0.0" to show on net work you also need to adjust clientport if using in a conntainer
watch: {usePolling: true},
hmr:{clientPort:61842},// the port you want the websocket to connect to.
strictPort: true
}
Note: please be careful clientPort is not the same as port.

trouble shooting

problem

Page contently refresh.

Websock are to blame. If it can not connect it will keep on trying

can not access web page even thought it is started.

This is caused by it not listen to your host by default you need to change server host in your vite.config.ts
you probably also have to change the port.

Alternative

try a diffrent framework

Additional context

I am tried of trying different frameworks your appears to be the best, But in all of them there documentation is awful(IMHO).

The have a huge learning curve. Since I can't find one that I feel is user friendly ,I want to improve on the documentation.

I demonstrated above what I would add and would like to keep on working on documentation but I keep find my ideas rejected.

Almost every project I tried to work on has been a bad new user experience (a nightmare).

Please be different.

Validations

@bluwy
Copy link
Member

bluwy commented Jun 26, 2022

I agree that the documentation for these setups could be improved. We have #4116 to focus the effort to documentthem. Feel free to submit PRs regarding notes on this. I also think some of the issues you faced has been resolved e.g. #8650, so the experience might be better now. Closing in favour of the issue linked to keep a single place of discussion.

@bluwy bluwy closed this as completed Jun 26, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants