Errors after deployment
Answered
Brown bear posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Brown bearOP
I have no idea why this error is happening. Deployment: https://file-app-coral.vercel.app
Github repo: https://github.com/findof1/fileApp.
Error: It occurs when I click on a post's title to go to the route, '/home/[file]
it says Application error: a client-side exception has occurred (see the browser console for more information). The console says, 69-1f697a7175ba37d4.js:1 ReferenceError: Cannot access 'O' before initialization
at t.default (page-65e0d94d52161633.js:1:994)
at rk (fd9d1056-54882f75df51dd66.js:1:40367)
at lI (fd9d1056-54882f75df51dd66.js:1:59174)
at iB (fd9d1056-54882f75df51dd66.js:1:117029)
at o4 (fd9d1056-54882f75df51dd66.js:1:94629)
at fd9d1056-54882f75df51dd66.js:1:94451
at o3 (fd9d1056-54882f75df51dd66.js:1:94458)
at oQ (fd9d1056-54882f75df51dd66.js:1:91945)
at oj (fd9d1056-54882f75df51dd66.js:1:91370)
at MessagePort.M (69-1f697a7175ba37d4.js:1:98423)
window.console.error @ 69-1f697a7175ba37d4.js:1
Github repo: https://github.com/findof1/fileApp.
Error: It occurs when I click on a post's title to go to the route, '/home/[file]
it says Application error: a client-side exception has occurred (see the browser console for more information). The console says, 69-1f697a7175ba37d4.js:1 ReferenceError: Cannot access 'O' before initialization
at t.default (page-65e0d94d52161633.js:1:994)
at rk (fd9d1056-54882f75df51dd66.js:1:40367)
at lI (fd9d1056-54882f75df51dd66.js:1:59174)
at iB (fd9d1056-54882f75df51dd66.js:1:117029)
at o4 (fd9d1056-54882f75df51dd66.js:1:94629)
at fd9d1056-54882f75df51dd66.js:1:94451
at o3 (fd9d1056-54882f75df51dd66.js:1:94458)
at oQ (fd9d1056-54882f75df51dd66.js:1:91945)
at oj (fd9d1056-54882f75df51dd66.js:1:91370)
at MessagePort.M (69-1f697a7175ba37d4.js:1:98423)
window.console.error @ 69-1f697a7175ba37d4.js:1
Answered by Hong
@Brown bear
components/File.js
, move this function before the useEffect
![Image](https://cdn.discordapp.com/attachments/1206265690995294239/1206268176065761310/CleanShot_2024-02-11_at_23.58.142x.png?ex=65db63c8&is=65c8eec8&hm=6cc23be77dd01c08b229403c56978ae5f72c862acb1a8927e89976a25370e484&)
6 Replies
![Avatar](https://cdn.discordapp.com/avatars/886269624608522240/381721db3beacbc4fd154661ef0da83a.webp?size=256)
Answer
![Avatar](https://cdn.discordapp.com/avatars/886269624608522240/381721db3beacbc4fd154661ef0da83a.webp?size=256)
ReferenceError: Cannot access 'O' before initialization
You can't use the arrow function before initializing.
![Avatar](https://cdn.discordapp.com/avatars/886269624608522240/381721db3beacbc4fd154661ef0da83a.webp?size=256)
@Hong <@886029036512485397> `components/File.js`, move this function before the `useEffect`
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Brown bearOP
i'll try it, 1 min
thanks bro
![Avatar](https://cdn.discordapp.com/avatars/886269624608522240/381721db3beacbc4fd154661ef0da83a.webp?size=256)
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Brown bearOP
lol