Next.js: An unexpected error has occurred in production build 9.1.6 version

Created on 30 Dec 2019  路  5Comments  路  Source: vercel/next.js

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.

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.

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swrdfish picture swrdfish  路  3Comments

renatorib picture renatorib  路  3Comments

timneutkens picture timneutkens  路  3Comments

DvirSh picture DvirSh  路  3Comments

rauchg picture rauchg  路  3Comments