Reputation: 381
I get the following error when I deploy to AWS Elastic Beanstalk. Does anyone know why it happens?
> [email protected] start /var/app/current
> next start -p $PORT
ready - started server on http://localhost:8081
TypeError: Cannot read property 'filter' of undefined
at NextScript.getPolyfillScripts (/var/app/current/.next/server/static/8Nm58iB3JDC5SQahrWuy9/pages/_document.js:735:26)
at NextScript.render (/var/app/current/.next/server/static/8Nm58iB3JDC5SQahrWuy9/pages/_document.js:836:75)
at d (/var/app/current/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:38:231)
at $a (/var/app/current/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:39:16)
at a.b.render (/var/app/current/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:44:476)
at a.b.read (/var/app/current/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:44:18)
at renderToStaticMarkup (/var/app/current/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:54:462)
at renderDocument (/var/app/current/node_modules/next/dist/next-server/server/render.js:3:624)
at renderToHTML (/var/app/current/node_modules/next/dist/next-server/server/render.js:50:72)
at process._tickCallback (internal/process/next_tick.js:68:7)
Upvotes: 1
Views: 543
Reputation: 1
Not a lot of info here to go off of, but I had this exact issue when deploying to an ec2 container and upgrading to Next 9.5.1 fixed it (previously at 9.4.4).
Upvotes: 0