Issue 1:
Everything was working fine until I did npm update, I see this problem.

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

the only change I see that could break is "next": "^4.0.0-beta.1", changing to "next": "^4.0.0-beta.2". I reverted next back to "next": "^4.0.0-beta.1", but the isssue persists.

I run Next using node server.js using next-routes.

Server side code is:

// 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(() => {
createServer(handler).listen(port);
});

The issue is referenced here as well. Not sure whether it is React 16 or NEXT.js

amcharts/amcharts3-react#53

Any idea what could be the issue?

I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

Tech
Version

next
4.0.0.beta.2

node
v8.4.0

OS
10.12.6

browser
Chrome 61.0.3163.100

next-routes
^1.0.40"

react
16

Issue 2:
Looking at many SSG specific features being built into Nextjs (especially #9524) , here's what I think is the biggest issue in using Nextjs for SSG.

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.

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.

I dont believe there is any real way the two usecases can be merged in docs without massive cognitive overload for the user.

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").