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

[TypeScript] Found 0 errors. Watching for file changes. #165

Closed
jaychoubaby opened this issue Dec 6, 2023 · 12 comments
Closed

[TypeScript] Found 0 errors. Watching for file changes. #165

jaychoubaby opened this issue Dec 6, 2023 · 12 comments

Comments

@jaychoubaby
Copy link

I have deployed it using Docker, but when accessing the backend service, there is a prompt.

Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.

Error accessing front-end service as follows:[TypeScript] Found 0 errors. Watching for file changes.

@limboinf
Copy link

limboinf commented Dec 6, 2023

This looks very confusing. It should be an issue with the lasted version of the vite-plugin-checker plugin:
fi3ework/vite-plugin-checker#238

@abi
Copy link
Owner

abi commented Dec 6, 2023

What happens when you go the front-end URL?

"ERROR" showing up on the front-end logs is harmless and related to what @limboinf mentioned I believe

@jaychoubaby
Copy link
Author

What happens when you go the front-end URL?

"ERROR" showing up on the front-end logs is harmless and related to what @limboinf mentioned I believe

image
This is the error prompt for the front-end.

@abi
Copy link
Owner

abi commented Dec 7, 2023

Can you open up your developer console and show me the logs?

Or you can use the hosted version at screenshot-to-code.com

@jaychoubaby
Copy link
Author

Can you open up your developer console and show me the logs?

Or you can use the hosted version at screenshot-to-code.com

image

@abi
Copy link
Owner

abi commented Dec 7, 2023

That didn't really help. I think the issue is most likely that your front end isn't connecting to the backend.

127.0.0.1:7001 opens fine on your browser?

are you running this locally?

@jaychoubaby
Copy link
Author

That didn't really help. I think the issue is most likely that your front end isn't connecting to the backend.

127.0.0.1:7001 opens fine on your browser?

are you running this locally?

I deployed it on the server. It cannot be accessed locally using 127.0.0.1:7001, but when using ip:7001, the following prompt is displayed:
Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.

@abi
Copy link
Owner

abi commented Dec 7, 2023

Ah that's the problem then.

The problem is when you access the IP from your local machine, the backend IP you need to use can't be the internal machine IP, it has to be the external IP.

So updated frontend/.env.local:

VITE_WS_BACKEND_URL=ws://..

@abi
Copy link
Owner

abi commented Dec 7, 2023

Yeah if you update it, you need to re build the docker image.

@jaychoubaby
Copy link
Author

Yeah if you update it, you need to re build the docker image.

Yes, I have made configuration changes and redeployed the image, but the same error persists.
image

@abi
Copy link
Owner

abi commented Dec 7, 2023

That .env is in frontend, not backend

@jaychoubaby
Copy link
Author

That .env is in frontend, not backend
Now it's okay, thank you very much for your help.

@abi abi closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants