{"action":"created","issue":{"url":"https://api.github.com/repos/zeit/now-builders/issues/164","repository_url":"https://api.github.com/repos/zeit/now-builders","labels_url":"https://api.github.com/repos/zeit/now-builders/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/zeit/now-builders/issues/164/comments","events_url":"https://api.github.com/repos/zeit/now-builders/issues/164/events","html_url":"https://github.com/zeit/now-builders/issues/164","id":398262670,"node_id":"MDU6SXNzdWUzOTgyNjI2NzA=","number":164,"title":"TypeError deploying to Zeit v2.0 with WithApolloClient _app.js and Emotion 10","user":{"login":"tcerdaITBA","id":12466599,"node_id":"MDQ6VXNlcjEyNDY2NTk5","avatar_url":"https://avatars3.githubusercontent.com/u/12466599?v=4","gravatar_id":"","url":"https://api.github.com/users/tcerdaITBA","html_url":"https://github.com/tcerdaITBA","followers_url":"https://api.github.com/users/tcerdaITBA/followers","following_url":"https://api.github.com/users/tcerdaITBA/following{/other_user}","gists_url":"https://api.github.com/users/tcerdaITBA/gists{/gist_id}","starred_url":"https://api.github.com/users/tcerdaITBA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcerdaITBA/subscriptions","organizations_url":"https://api.github.com/users/tcerdaITBA/orgs","repos_url":"https://api.github.com/users/tcerdaITBA/repos","events_url":"https://api.github.com/users/tcerdaITBA/events{/privacy}","received_events_url":"https://api.github.com/users/tcerdaITBA/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"lfades","id":4278345,"node_id":"MDQ6VXNlcjQyNzgzNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4278345?v=4","gravatar_id":"","url":"https://api.github.com/users/lfades","html_url":"https://github.com/lfades","followers_url":"https://api.github.com/users/lfades/followers","following_url":"https://api.github.com/users/lfades/following{/other_user}","gists_url":"https://api.github.com/users/lfades/gists{/gist_id}","starred_url":"https://api.github.com/users/lfades/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfades/subscriptions","organizations_url":"https://api.github.com/users/lfades/orgs","repos_url":"https://api.github.com/users/lfades/repos","events_url":"https://api.github.com/users/lfades/events{/privacy}","received_events_url":"https://api.github.com/users/lfades/received_events","type":"User","site_admin":false},"assignees":[{"login":"lfades","id":4278345,"node_id":"MDQ6VXNlcjQyNzgzNDU=","avatar_url":"https://avatars3.githubusercontent.com/u/4278345?v=4","gravatar_id":"","url":"https://api.github.com/users/lfades","html_url":"https://github.com/lfades","followers_url":"https://api.github.com/users/lfades/followers","following_url":"https://api.github.com/users/lfades/following{/other_user}","gists_url":"https://api.github.com/users/lfades/gists{/gist_id}","starred_url":"https://api.github.com/users/lfades/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfades/subscriptions","organizations_url":"https://api.github.com/users/lfades/orgs","repos_url":"https://api.github.com/users/lfades/repos","events_url":"https://api.github.com/users/lfades/events{/privacy}","received_events_url":"https://api.github.com/users/lfades/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-12-31T21:30:08Z","updated_at":"2019-04-03T12:30:09Z","closed_at":"2019-03-29T21:27:01Z","author_association":"NONE","body":"# Examples bug report\r\n\r\n## Example Name\r\n[with-emotion](https://github.com/zeit/next.js/tree/canary/examples/with-emotion)\r\n\r\n## Describe the bug\r\nDeploying to Zeit Now 2.0 with custom `_app.js` and Emotion 10 produces an 500 error originated from the following TypeError recovered from the Zeit deployment logs:\r\n\r\n```\r\nTypeError: Cannot read property 'registered' of undefined\r\n    at Object.children (/var/task/.next/server/static/RolwaMefjPFTL~9yHWUpF/pages/index.js:6:4638)\r\n    at ReactDOMServerRenderer.render (/var/task/node_modules/react-dom/cjs/react-dom-server.node.development.js:3292:55)\r\n    at ReactDOMServerRenderer.read (/var/task/node_modules/react-dom/cjs/react-dom-server.node.development.js:3059:29)\r\n    at renderToString (/var/task/node_modules/react-dom/cjs/react-dom-server.node.development.js:3526:27)\r\n    at render (/var/task/node_modules/next-server/dist/server/render.js:45:16)\r\n    at renderPage (/var/task/node_modules/next-server/dist/server/render.js:112:16)\r\n    at Function.value (/var/task/.next/server/static/RolwaMefjPFTL~9yHWUpF/pages/_document.js:1:20266)\r\n    at Object.loadGetInitialProps (/var/task/node_modules/next-server/dist/lib/utils.js:44:35)\r\n    at Object.renderToHTML (/var/task/node_modules/next-server/dist/server/render.js:115:36)\r\n    at <anonymous>\r\n```\r\n\r\nThis only occurs with Zeit Now 2 and when wrapping `_app.js` with the `WithApolloClient` HOC taken from [with-apollo example](https://github.com/zeit/next.js/tree/canary/examples/with-apollo). Either removing Emotion's components or removing the HOC from `_app.js` or deploying to Zeit Now 1 produces a successful deploy.\r\n\r\n## To Reproduce\r\n1. `npx create-next-app --example with-emotion with-emotion-app`\r\n2. `cd with-emotion-app`\r\n3. `yarn install apollo-boost react-apollo graphql isomorphic-unfetch`\r\n4. Copy `lib` directory and `pages/_app.js` from [with-apollo example](https://github.com/zeit/next.js/tree/canary/examples/with-apollo)\r\n5. Write `now.json`:\r\n```\r\n{\r\n  \"version\": 2,\r\n  \"builds\": [\r\n    { \"src\": \"package.json\", \"use\": \"@now/next\" }\r\n  ]\r\n}\r\n```\r\n6. Deploy with `now`\r\n\r\n## Expected behavior\r\nhttps://with-emotion-app-annixbe92.now.sh/\r\n\r\n## Actual behavior\r\nhttps://with-emotion-app-a49lrf5ni.now.sh/\r\n\r\n## System information\r\n - OS: macOS\r\n - Browser: any since the error is originated the server\r\n"},"comment":{"url":"https://api.github.com/repos/zeit/now-builders/issues/comments/479468379","html_url":"https://github.com/zeit/now-builders/issues/164#issuecomment-479468379","issue_url":"https://api.github.com/repos/zeit/now-builders/issues/164","id":479468379,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3OTQ2ODM3OQ==","user":{"login":"tcerdaITBA","id":12466599,"node_id":"MDQ6VXNlcjEyNDY2NTk5","avatar_url":"https://avatars3.githubusercontent.com/u/12466599?v=4","gravatar_id":"","url":"https://api.github.com/users/tcerdaITBA","html_url":"https://github.com/tcerdaITBA","followers_url":"https://api.github.com/users/tcerdaITBA/followers","following_url":"https://api.github.com/users/tcerdaITBA/following{/other_user}","gists_url":"https://api.github.com/users/tcerdaITBA/gists{/gist_id}","starred_url":"https://api.github.com/users/tcerdaITBA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcerdaITBA/subscriptions","organizations_url":"https://api.github.com/users/tcerdaITBA/orgs","repos_url":"https://api.github.com/users/tcerdaITBA/repos","events_url":"https://api.github.com/users/tcerdaITBA/events{/privacy}","received_events_url":"https://api.github.com/users/tcerdaITBA/received_events","type":"User","site_admin":false},"created_at":"2019-04-03T12:30:09Z","updated_at":"2019-04-03T12:30:09Z","author_association":"NONE","body":"@lfades Thank you very much for your update. I have updated the `next` and `next-with-apollo` dependencies and can confirm that everything works as intended with Emotion. \r\n\r\nWorking example: https://gmn-boilerplate.tomascerda.now.sh\r\n\r\nRepo: https://github.com/tcerdaITBA/Serverless-Graphql-Next.js-boilerplate"}}
{"actor":{"display_login":"tcerdaITBA"}}