after successful serve, and build -f.
run application, and got:
ERRO[0000] * Caught Unhandled Error *
ERRO[0000] Message: Script error.
ERRO[0000] URL:
ERRO[0000] Line No: 0
ERRO[0000] Column No: 0
ERRO[0000] error: null
What is mean? Where is bug? What I need to fix?
Without any context, we can't help much.
I'll try to give more information without posting all project...
And I try to explain.
wails 1.0.1
js dependeces:
"core-js": "^3.1.4",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"wails-react-scripts": "3.0.1-2",
"react-modal": "3.8.1",
"@wailsapp/runtime": "^1.0.0",
"@date-io/date-fns": "^1.3.11",
"@material-ui/core": "^4.5.1",
"@material-ui/icons": "^4.5.1",
"@material-ui/pickers": "^3.2.7",
"@y0c/react-datepicker": "^1.0.1",
"classnames": "^2.2.6",
"clsx": "^1.0.4",
"connected-react-router": "^6.5.2",
"date-fns": "^2.7.0",
"dayjs": "^1.8.17",
"history": "^4.10.1",
"i18n": "^0.8.3",
"i18next": "^18.0.1",
"i18next-browser-languagedetector": "^4.0.0",
"i18next-xhr-backend": "^3.2.0",
"moment": "^2.24.0",
"prop-types": "^15.7.2",
"react-datepicker": "^2.10.0",
"react-i18next": "^9.0.10",
"react-input-mask": "^2.0.4",
"react-onclickoutside": "^6.9.0",
"react-redux": "^7.1.1",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-redux-form": "^1.16.14",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.1",
"reselect": "^4.0.0",
"react-select": "^3.0.8"
Sorry for addon. But - as I see - problem somewhere in using ReactRouter...
and also - in serve mode - all works fine - no bugs. In build -f prod mode - doesn't work - ReactRouter doesn't render component. And
hey @VladislavSournine
when using react router only use the hash router (if not already) - ie. https://stackoverflow.com/questions/50266537/react-router-using-hash-url
also yarn use is not supported by wails, only npm, but I don't think your issue is yarn related.
hey @VladislavSournine
when using react router only use the hash router (if not already) - ie. https://stackoverflow.com/questions/50266537/react-router-using-hash-urlalso yarn use is not supported by wails, only npm, but I don't think your issue is yarn related.
Yep. this solution works fine.
Thank you, @bh90210 ! ;-)
I think we.need to get some of this in the guides section of the site. I'll add this bit of information over the holidays
@leaanthony Good idea
Hello everyone,
I'm trying to use react-router using HashRouter as suggested and it works fine in dev (using serve).
But built binary is not working (on Windows, Wails 1.0.2).
As soon as the applications starts and renders about:blank#/ ):

My router code is really the simplest possible:
<HashRouter>
<Switch>
<Route path='/' component={Home} />
</Switch>
</HashRouter>
@VladislavSournine are you able to share your working solution?
Thanks!
Edit:
I run the same exact code on macOS, and I got the same error as op:
ERRO[0000] **** Caught Unhandled Error ****
ERRO[0000] Message: Script error.
ERRO[0000] URL:
ERRO[0000] Line No: 0
ERRO[0000] Column No: 0
ERRO[0000] error: null
Edit 2:
Switched to <MemoryRouter> everything works fine 馃帀
Most helpful comment
Thank you, @bh90210 ! ;-)