Build error occurred TypeError: Cannot read property 'GJ' of undefined
See original GitHub issueWhat version of Next.js are you using?
12.0.7
What version of Node.js are you using?
14.17.0
What browser are you using?
firefox
What operating system are you using?
macOS
How are you deploying your application?
next build
Describe the Bug
when is executed yarn build
everything ok but in the end, it’s throw this error :
yarn run v1.22.15
$ next build
info - Checking validity of types
warn - No ESLint configuration detected. Run next lint to begin setup
info - Creating an optimized production build
info - Compiled successfully
(node:61364) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'GJ' of undefined
at Object.GJ (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:180:91)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:903:65
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.61802 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:887:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:874:63
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.64253 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:863:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:4741:71
(Use `node --trace-warnings ...` to show where the warning was created)
(node:61364) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated eitherby throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2233)
(node:61364) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:61364) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'GJ' of undefined
at Object.GJ (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:180:91)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:903:65
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.61802 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:887:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:874:63
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.64253 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:863:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:4741:71
(node:61364) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated eitherby throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2234)
> Build error occurred
TypeError: Cannot read property 'GJ' of undefined
at Object.GJ (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:180:91)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:903:65
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.61802 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:887:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:874:63
at Function.__webpack_require__.a (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:98:13)
at Object.64253 (/Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:863:21)
at __webpack_require__ (/Users/syd/work/newKaryan/packages/front/.next/server/webpack-runtime.js:25:42)
at /Users/syd/work/newKaryan/packages/front/.next/server/chunks/574.js:4741:71 {
type: 'TypeError'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Expected Behavior
build it successfully
To Reproduce
just run yarn build
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ng build throws "ERROR in Cannot read property 'kind' of ...
So I found the solution. I had to go in and edit the tsconfig.json. Under "angularCompilerOptions" I had to add "enableIvy": false ....
Read more >cannot read properties of undefined (reading 'create') node js
I am new to Vue js and faced with the following problem: When trying to launch a project, an error occurs: Cannot read...
Read more >Uncaught TypeError: Cannot read property '1' of undefined
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . Uncaught TypeError: Cannot...
Read more >Uncaught TypeError: Cannot read property 'find' of undefined
Looks like the line findById is async so you need to await it or use .then(). Might help to also console log the...
Read more >GX Mobile Game Jam - October 4th - Sign Up! | Page 2
Uncaught TypeError: Cannot read properties of undefined (reading ... exception throw .see javascript console. error on Opera GX gxc.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m don’t have any
.babelrc
file. but I’m trying to remove page/configuration piece by piece to find out the root cause of the problemThis closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.