Issue 1:
There was a bug introduced in the walk module ~1hr ago. The issue is in version walk@2.3.11. For some reason, npm install is resolving the 2.3.11 version, even though the latest next.js package.json pins the walk module to 2.3.9.

Either way, a bad publish in the walk module has occurred and will likely break builds if that version is resolved.

For reference:

2.3.10: https://unpkg.com/walk@2.3.10/lib/node-type-emitter.js (no flagSet var)

2.3.11: https://unpkg.com/walk@2.3.11/lib/node-type-emitter.js (undefined flagSet var)

This is from my package.lock.json after running npm install

"next": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/next/-/next-3.2.3.tgz",
"integrity": "sha512-oJ8qi+t+rsEY3vll7jc5zDEoRyUzGsKoSi1Tx7vYYHYIjdmcG3fgjLBuHp5YkP6nzhldzs+tJhK36fJzM1Uh6w==",
"requires": {
"ansi-html": "0.0.7",
"babel-core": "6.25.0",
"babel-generator": "6.25.0",
"babel-loader": "7.1.1",
"babel-plugin-module-resolver": "2.6.2",
"babel-plugin-react-require": "3.0.0",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.5",
"babel-plugin-transform-runtime": "6.22.0",
"babel-preset-env": "1.6.0",
"babel-preset-react": "6.24.1",
"babel-runtime": "6.23.0",
"babel-template": "6.25.0",
"case-sensitive-paths-webpack-plugin": "2.1.1",
"cross-spawn": "5.1.0",
"del": "3.0.0",
"etag": "1.8.0",
"fresh": "0.5.0",
"friendly-errors-webpack-plugin": "1.5.0",
"glob": "7.1.1",
"glob-promise": "3.1.0",
"hoist-non-react-statics": "2.5.0",
"htmlescape": "1.1.1",
"http-status": "1.0.1",
"json-loader": "0.5.4",
"loader-utils": "1.1.0",
"md5-file": "3.1.1",
"minimist": "1.2.0",
"mkdirp-then": "1.2.0",
"mv": "2.1.1",
"mz": "2.6.0",
"path-match": "1.2.4",
"pkg-up": "2.0.0",
"prop-types": "15.5.10",
"prop-types-exact": "1.1.2",
"react-hot-loader": "3.0.0-beta.7",
"recursive-copy": "2.0.9",
"send": "0.15.6",
"source-map-support": "0.4.15",
"strip-ansi": "3.0.1",
"styled-jsx": "1.0.11",
"touch": "3.1.0",
"unfetch": "3.0.0",
"url": "0.11.0",
"uuid": "3.1.0",
"walk": "2.3.11",
"webpack": "3.3.0",
"webpack-dev-middleware": "1.11.0",
"webpack-hot-middleware": "2.18.2",
"write-file-webpack-plugin": "4.1.0",
"xss-filters": "1.2.7"
}

Also, this package does not have a github repository so I cannot file it there, but this is the source code in question - https://git.coolaj86.com/coolaj86/fs-walk.js/src/branch/master/lib/node-type-emitter.js#L53

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

Expected Behavior

next export should execute successfully

Steps to Reproduce (for bugs)

Running npm install, then next build, then next export will throw this error.

Your Environment

Tech
Version

next
3.2.3

node
8.9.x

OS
osx @ latest

browser

etc

Issue 2:
Bug report

Describe the bug

When using next.js with a custom-server, publicRuntimeConfig is undefined in the client.

To Reproduce

Check the logs on these Codesandboxes:

Working without a server: hello-world

Not working with a custom server: custom-server-express

Expected behavior

publicRuntimeConfig to be as set in next.config.js.

System information

Version of Next.js: 7.0.2

What am I missing here? Is getConfig not supposed to work with a custom server? What would be the alternative?