title: Next.js - Head element doesn't work
body: <p>I have a quite simple Layout component that uses the <code>Head</code> component shipped with Next.js:</p>
  
  <pre><code>import React from 'react';                                                                                                 
  import { Container } from 'semantic-ui-react';                                                                             
  import { Head } from 'next/head';                                                                                                                                                                                                         
  
  import Header from './Header';                                                                                             
  
  const Layout = ({ children }) =&gt; (                                                                                         
    &lt;Container&gt;                                                                                                              
      &lt;Head&gt;                                                                                                                 
        &lt;link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/semantic.min.css" /&gt;                 
      &lt;/Head&gt;                                                                                                                
      &lt;Header /&gt;                                                                                                             
      {children}                                                                                                             
      &lt;h1&gt;Footer&lt;/h1&gt;                                                                                                        
    &lt;/Container&gt;                                                                                                             
  );                                                                                                                         
  
  export default Layout;  
  </code></pre>
  
  <p>That gives me an error:</p>
  
  <pre><code>Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
      at invariant (/app/node_modules/fbjs/lib/invariant.js:42:15)
      at ReactDOMServerRenderer.render (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2522:7)
      at ReactDOMServerRenderer.read (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2354:19)
      at renderToString (/app/node_modules/react-dom/cjs/react-dom-server.node.development.js:2726:25)
      at renderPage (/app/node_modules/next/dist/server/render.js:275:26)
      at Function.getInitialProps (/app/node_modules/next/dist/server/document.js:67:25)
      at _callee$ (/app/node_modules/next/dist/lib/utils.js:111:30)
      at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:62:40)
      at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:296:22)
      at Generator.prototype.(anonymous function) [as next] (/app/node_modules/regenerator-runtime/runtime.js:114:21)
      at step (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)
      at _next (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:27:9)
      at /app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:34:7
      at new Promise (&lt;anonymous&gt;)
      at new F (/app/node_modules/core-js/library/modules/_export.js:36:28)
      at /app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:7:12
      at loadGetInitialProps (/app/node_modules/next/dist/lib/utils.js:90:31)
      at _callee3$ (/app/node_modules/next/dist/server/render.js:296:51)
      at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:62:40)
      at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:296:22)
      at Generator.prototype.(anonymous function) [as next] (/app/node_modules/regenerator-runtime/runtime.js:114:21)
      at step (/app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:12:30)
  </code></pre>
  
  <p>The error disappears if I don't use the <code>Head</code> component. </p>
  
  <p>I can't find some related issue on Next.js page on Github and can't find something relevant on Google. </p>
  
  <p>Any thoughts?</p>