Update with-react-esi example (type error)
See original GitHub issueExamples 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:
- clone the example
- add custom _app.js
- run docker-compose up --build
- go to the browser (localhost:80)
- see internal server error
Expected behavior
Wanted to add styled components provider to custom _app.js and run in production.
Screenshots
System information
- OS: Windows 10
- Browser (if applies) Chrome
- Version of Next.js: latest
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
Hi @Timer , this example project is no longer in the example repo.
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.