Issue 1:
Running npm run install and npm run start --p 3000 locally works no issues using same version of node.

Once deployed using the package.json below I'm receiving errors as in the Heroku Logs below.

Big thanks for all the effort being put into this project.

package.json

{
"name": "xxx",
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"node": "6.9.1"
},
"dependencies": {
"glamor": "2.20.20",
"google-map-react": "0.22.0",
"google-maps-react": "1.0.19",
"isomorphic-fetch": "2.2.1",
"lodash.range": "3.2.0",
"next": "2.0.0-beta.15",
"numeral": "2.0.3",
"react-bootstrap": "0.30.6",
"react-google-maps": "6.0.1",
"react-inlinesvg": "0.5.4",
"react-input-range": "0.9.3",
"react-redux": "4.4.5",
"react-select": "1.0.0-rc.2",
"react-slick": "0.14.5",
"react-svg-pan-zoom": "2.2.2",
"redux": "3.6.0",
"redux-form": "6.2.1",
"redux-thunk": "2.1.0"
},
"devDependencies": {
"browser-sync": "2.18.2",
"bootstrap-sass": "3.3.7",
"gulp": "3.9.1",
"gulp-sass": "2.3.2"
},
"scripts": {
"dev": "next",
"install": "next build",
"start": "next start -p ${PORT}"
}
}

Heroku Logs

{ Error: Cannot find module '/tmp/build_64ddcd154cf30721ff7251c45faf0a03/node_modules/next/dist/server/document.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/.next/dist/pages/_document.js:3:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module '/tmp/build_64ddcd154cf30721ff7251c45faf0a03/node_modules/babel-runtime/core-js/object/get-prototype-of'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/.next/dist/pages/_error.js:7:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }

Issue 2:
Bug report

Describe the bug

First bug report so patience appreciated. Following an installation of @material-ui/core receive "Invalid hook call". Traced the issue back to any hook in general and react installation location.

To Reproduce

Created simple standard folder structure:

src

|--components

|--pages

|--package.json

|--next.config.js

|--etc. etc.

public

|--placeholder.html

|--404.html

functions

|--index.js

|--package.json

Functions package.json is identical with additional firebase-admin and firebase-functions

Once you add @material-ui/core and make a simple button get:

Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

Changing the button to simple <button onClick={...}>Click Me</button> works.

On deploy, the following error:

Error occurred prerendering page "/" https://err.sh/zeit/next.js/prerender-error: Error: Minified React error #321

Expected behavior

Easy implementation of @material-ui

Screenshots

If applicable, add screenshots to help explain your problem.

System information

linux ubuntu

Additional context

This is not a duplicate of #7626