evgeny-nadymov / telegram-react

Experimental Telegram web client with tdlib, webassembly and react js under the hood
https://evgeny-nadymov.github.io/telegram-react/
GNU General Public License v3.0
2.3k stars 602 forks source link

Can't run basic App in dev mode, no countries to login #147

Closed Sparkenstein closed 4 years ago

Sparkenstein commented 4 years ago

I am having trouble running the app. Well, Application runs fine but I can't login. I found the bug but not sure what the solution is. In the network tab I checked, I am getting all data/ files as "html", attaching the screenshot below.

Steps to reproduce:

Screenshot_2020-03-08_00-31-29 Screenshot_2020-03-08_00-31-48

Sparkenstein commented 4 years ago

After some more debugging I found out that it's an issue with path /telegram-react not sure how it works but in dev move if i modify src/util/Phone.js path for countries.dat to fetch('telegram-react/data/countries.dat'); it works. but I am facing another issue in bundled code. I ran yarn run build and it created build successfully but it's also having same issue with path /telegram-react. I am getting 404 for all assets after deploying bundle. Here's the screenshot

Screenshot_2020-03-08_13-19-29

Sparkenstein commented 4 years ago

"homepage": "./", property in package.json fixed it. I think it should be mentioned in README that to run the project on local, we need to change homepage property in package.json