question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update with-react-esi example (type error)

See original GitHub issue

Examples bug report

Example name

with-react-esi

Describe the bug

Unable to add custom _app.js file into a project. After creating and building the example via docker-compose up, an error occurs:

node_1 | TypeError: Class constructor App cannot be invoked without 'new' node_1 | at new MyApp (/usr/src/app/dist/.next/server/static/QWF1PHuowO_sU-px49ruG/pages/_app.js:196:102) node_1 | at c (/usr/src/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:323) node_1 | at Sa (/usr/src/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:1) node_1 | at a.render (/usr/src/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:467) node_1 | at a.read (/usr/src/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:58) node_1 | at renderToString (/usr/src/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:53:83) node_1 | at render (/usr/src/app/node_modules/next-server/dist/server/render.js:80:16) node_1 | at renderPage (/usr/src/app/node_modules/next-server/dist/server/render.js:237:20) node_1 | at /usr/src/app/dist/.next/server/static/QWF1PHuowO_sU-px49ruG/pages/_document.js:236:17 node_1 | at Generator.next (<anonymous>)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. clone the example
  2. add custom _app.js
  3. run docker-compose up --build
  4. go to the browser (localhost:80)
  5. see internal server error

Expected behavior

Wanted to add styled components provider to custom _app.js and run in production.

Screenshots

Screenshot_1 Screenshot_2

System information

  • OS: Windows 10
  • Browser (if applies) Chrome
  • Version of Next.js: latest

Additional context

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sushilbansalcommented, Apr 14, 2020

Hi @Timer , this example project is no longer in the example repo.

0reactions
balazsorban44commented, Jan 30, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update with-react-esi example (type error) #8262 - GitHub
Examples bug report Example name with-react-esi Describe the bug Unable to add custom _app.js file into a project.
Read more >
TypeError - JavaScript - MDN Web Docs
A TypeError may be thrown when: an operand or argument passed to a function is incompatible with the type expected by that operator...
Read more >
How to Fix TypeError Exceptions in Python - Rollbar
The Python TypeError is an exception that occurs when the data type of an object in an operation is inappropriate. Learn how to...
Read more >
Types of Errors in Update set - ServiceNow Community
Few of the most common problems that occurs in Update set: 1.?? Error type: Missing object. Example: “Could not find a record in ......
Read more >
16.10 - Update Operator Errors - Parallel Transporter
When the Update operator encounters a data row that cannot be processed properly, it creates a row in one of the two error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found