an unexpected error has occurred in production build and following error shown in the console
TypeError: Cannot read property 'attach' of undefined
at nn (commons.5752e1f292d2b25a6a64.js:1)
at commons.5752e1f292d2b25a6a64.js:1
at commons.5752e1f292d2b25a6a64.js:1
at commons.5752e1f292d2b25a6a64.js:1
at commons.5752e1f292d2b25a6a64.js:1
at da (commons.5752e1f292d2b25a6a64.js:1)
at Va (commons.5752e1f292d2b25a6a64.js:1)
at Tu (commons.5752e1f292d2b25a6a64.js:1)
at Tl (commons.5752e1f292d2b25a6a64.js:1)
at jl (commons.5752e1f292d2b25a6a64.js:1)
When we run npm start command project will working fine.
Reference this issue #9854 and check the fix if it helps out.
Do a global search on your editot for keyword "attach" and check that the files using this is used correctly
It's impossible to help based on half a stacktrace and a random error without a full reproduction. Closing as the issue template was ignored.
If Nextjs would give better error messages it would be easier to find the error, same here on a clean install of the Chakra-ui template only added a few contexts files nothing more and got this error on every route except index.
If Nextjs would give better error messages it would be easier to find the error, same here on a clean install of the Chakra-ui template only added a few contexts files nothing more and got this error on every route except index.
Same argument from my previous comment still applies, we can't improve the stacktraces you're running into if you do not provide a complete reproduction in a github repository.
Same argument from my previous comment still applies, we can't improve the stacktraces you're running into if you do not provide a complete reproduction in a github repository.
Sorry, the problem was due to a package I tried to use on the server, stitch-browser-sdk
Most helpful comment
If Nextjs would give better error messages it would be easier to find the error, same here on a clean install of the Chakra-ui template only added a few contexts files nothing more and got this error on every route except index.