<p dir="auto">Everything was working fine until I did npm update, I see this problem.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: Cannot read property 'toLowerCase' of undefined
    at ReactDOMServerRenderer.renderDOM (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2776:27)
    at ReactDOMServerRenderer.render (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2755:23)
    at ReactDOMServerRenderer.read (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2722:19)
    at renderToStaticMarkup (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2991:25)
    at _callee3$ (/Users/****/Projects/****/node_modules/next/dist/server/render.js:224:100)
    at tryCatch (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13"><pre class="notranslate"><code class="notranslate">TypeError: Cannot read property 'toLowerCase' of undefined
    at ReactDOMServerRenderer.renderDOM (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2776:27)
    at ReactDOMServerRenderer.render (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2755:23)
    at ReactDOMServerRenderer.read (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2722:19)
    at renderToStaticMarkup (/Users/****/Projects/****/node_modules/react-dom/cjs/react-dom-server.node.development.js:2991:25)
    at _callee3$ (/Users/****/Projects/****/node_modules/next/dist/server/render.js:224:100)
    at tryCatch (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/****/Projects/****/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/****/Projects/****/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
</code></pre></div>
<p dir="auto">the only change I see that could break is <code class="notranslate">"next": "^4.0.0-beta.1",</code> changing to <code class="notranslate">"next": "^4.0.0-beta.2"</code>. I reverted next back to <code class="notranslate">"next": "^4.0.0-beta.1",</code> but the isssue persists.</p>
<p dir="auto">I run Next using <code class="notranslate">node server.js</code> using <a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-routes">next-routes</a>.</p>
<p dir="auto">Server side code is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// server.js
const next = require('next');
const routes = require('./lib/routes');
const { createServer } = require('http');

const dev = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || 3000;
const app = next({ dev });
const handler = routes.getRequestHandler(app);

app.prepare().then(() =&gt; {
  createServer(handler).listen(port);
});"><pre class="notranslate"><code class="notranslate">// server.js
const next = require('next');
const routes = require('./lib/routes');
const { createServer } = require('http');

const dev = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || 3000;
const app = next({ dev });
const handler = routes.getRequestHandler(app);

app.prepare().then(() =&gt; {
  createServer(handler).listen(port);
});
</code></pre></div>
<p dir="auto">The issue is referenced here as well. Not sure whether it is React 16 or NEXT.js<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="247994505" data-permission-text="Title is private" data-url="https://github.com/amcharts/amcharts3-react/issues/53" data-hovercard-type="issue" data-hovercard-url="/amcharts/amcharts3-react/issues/53/hovercard" href="https://github.com/amcharts/amcharts3-react/issues/53">amcharts/amcharts3-react#53</a></p>
<p dir="auto">Any idea what could be the issue?</p>


<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>4.0.0.beta.2</td>
</tr>
<tr>
<td>node</td>
<td>v8.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 61.0.3163.100</td>
</tr>
<tr>
<td><a class="issue-link js-issue-link notranslate" rel="noopener noreferrer nofollow" href="https://linear.app/vercel/issue/NEXT-routes">next-routes</a></td>
<td>^1.0.40"</td>
</tr>
<tr>
<td>react</td>
<td>16</td>
</tr>
</tbody>
</table>
<p dir="auto">Looking at many SSG specific features being built into Nextjs (especially <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528348833" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/9524" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/9524/hovercard" href="https://github.com/vercel/next.js/issues/9524">#9524</a>) , here's what I think is the biggest issue in using Nextjs for SSG.</p>
<p dir="auto">The problem is that Nextjs entire documentation and manuals are written from the perspective of a server-side rendering framework. They are not geared around the usecase of someone wanting to either quickly get started..or someone who is working with a Nextjs SSG and wanted help on some SSG contextual aspect.</p>
<p dir="auto">For example, the entire section of "Prefetching Pages", "Custom server and routing", and many more is not relevant for a SSG usecase. In fact on the left side - there is no section for "static site generation". The documentation page of Nextjs lets people think that this is not a usecase that Nextjs supports.</p>
<p dir="auto">I dont believe there is any real way the two usecases can be merged in docs without massive cognitive overload for the user.</p>
<p dir="auto">The documentation subsites should be entirely different for SSG and SSR usecases. Its ok if section are duplicated (which can be included in both sites from "common docs").</p>