<p dir="auto">There was a bug introduced in the <code class="notranslate">walk</code> module ~1hr ago. The issue is in version <code class="notranslate">walk@2.3.11</code>. For some reason, <code class="notranslate">npm install</code> is resolving the <code class="notranslate">2.3.11</code> version, even though the latest <code class="notranslate">next.js</code> <code class="notranslate">package.json</code> pins the walk module to <code class="notranslate">2.3.9</code>.</p>
<p dir="auto">Either way, a bad publish in the <code class="notranslate">walk</code> module has occurred and will likely break builds if that version is resolved.</p>
<p dir="auto">For reference:<br>
2.3.10: <a href="https://unpkg.com/walk@2.3.10/lib/node-type-emitter.js" rel="nofollow">https://unpkg.com/walk@2.3.10/lib/node-type-emitter.js</a> (no flagSet var)<br>
2.3.11: <a href="https://unpkg.com/walk@2.3.11/lib/node-type-emitter.js" rel="nofollow">https://unpkg.com/walk@2.3.11/lib/node-type-emitter.js</a> (undefined flagSet var)</p>
<p dir="auto">This is from my <code class="notranslate">package.lock.json</code> after running <code class="notranslate">npm install</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;next&quot;: {
      &quot;version&quot;: &quot;3.2.3&quot;,
      &quot;resolved&quot;: &quot;https://registry.npmjs.org/next/-/next-3.2.3.tgz&quot;,
      &quot;integrity&quot;: &quot;sha512-oJ8qi+t+rsEY3vll7jc5zDEoRyUzGsKoSi1Tx7vYYHYIjdmcG3fgjLBuHp5YkP6nzhldzs+tJhK36fJzM1Uh6w==&quot;,
      &quot;requires&quot;: {
        &quot;ansi-html&quot;: &quot;0.0.7&quot;,
        &quot;babel-core&quot;: &quot;6.25.0&quot;,
        &quot;babel-generator&quot;: &quot;6.25.0&quot;,
        &quot;babel-loader&quot;: &quot;7.1.1&quot;,
        &quot;babel-plugin-module-resolver&quot;: &quot;2.6.2&quot;,
        &quot;babel-plugin-react-require&quot;: &quot;3.0.0&quot;,
        &quot;babel-plugin-syntax-dynamic-import&quot;: &quot;6.18.0&quot;,
        &quot;babel-plugin-transform-class-properties&quot;: &quot;6.24.1&quot;,
        &quot;babel-plugin-transform-es2015-modules-commonjs&quot;: &quot;6.24.1&quot;,
        &quot;babel-plugin-transform-object-rest-spread&quot;: &quot;6.22.0&quot;,
        &quot;babel-plugin-transform-react-jsx-source&quot;: &quot;6.22.0&quot;,
        &quot;babel-plugin-transform-react-remove-prop-types&quot;: &quot;0.4.5&quot;,
        &quot;babel-plugin-transform-runtime&quot;: &quot;6.22.0&quot;,
        &quot;babel-preset-env&quot;: &quot;1.6.0&quot;,
        &quot;babel-preset-react&quot;: &quot;6.24.1&quot;,
        &quot;babel-runtime&quot;: &quot;6.23.0&quot;,
        &quot;babel-template&quot;: &quot;6.25.0&quot;,
        &quot;case-sensitive-paths-webpack-plugin&quot;: &quot;2.1.1&quot;,
        &quot;cross-spawn&quot;: &quot;5.1.0&quot;,
        &quot;del&quot;: &quot;3.0.0&quot;,
        &quot;etag&quot;: &quot;1.8.0&quot;,
        &quot;fresh&quot;: &quot;0.5.0&quot;,
        &quot;friendly-errors-webpack-plugin&quot;: &quot;1.5.0&quot;,
        &quot;glob&quot;: &quot;7.1.1&quot;,
        &quot;glob-promise&quot;: &quot;3.1.0&quot;,
        &quot;hoist-non-react-statics&quot;: &quot;2.5.0&quot;,
        &quot;htmlescape&quot;: &quot;1.1.1&quot;,
        &quot;http-status&quot;: &quot;1.0.1&quot;,
        &quot;json-loader&quot;: &quot;0.5.4&quot;,
        &quot;loader-utils&quot;: &quot;1.1.0&quot;,
        &quot;md5-file&quot;: &quot;3.1.1&quot;,
        &quot;minimist&quot;: &quot;1.2.0&quot;,
        &quot;mkdirp-then&quot;: &quot;1.2.0&quot;,
        &quot;mv&quot;: &quot;2.1.1&quot;,
        &quot;mz&quot;: &quot;2.6.0&quot;,
        &quot;path-match&quot;: &quot;1.2.4&quot;,
        &quot;pkg-up&quot;: &quot;2.0.0&quot;,
        &quot;prop-types&quot;: &quot;15.5.10&quot;,
        &quot;prop-types-exact&quot;: &quot;1.1.2&quot;,
        &quot;react-hot-loader&quot;: &quot;3.0.0-beta.7&quot;,
        &quot;recursive-copy&quot;: &quot;2.0.9&quot;,
        &quot;send&quot;: &quot;0.15.6&quot;,
        &quot;source-map-support&quot;: &quot;0.4.15&quot;,
        &quot;strip-ansi&quot;: &quot;3.0.1&quot;,
        &quot;styled-jsx&quot;: &quot;1.0.11&quot;,
        &quot;touch&quot;: &quot;3.1.0&quot;,
        &quot;unfetch&quot;: &quot;3.0.0&quot;,
        &quot;url&quot;: &quot;0.11.0&quot;,
        &quot;uuid&quot;: &quot;3.1.0&quot;,
        &quot;walk&quot;: &quot;2.3.11&quot;,
        &quot;webpack&quot;: &quot;3.3.0&quot;,
        &quot;webpack-dev-middleware&quot;: &quot;1.11.0&quot;,
        &quot;webpack-hot-middleware&quot;: &quot;2.18.2&quot;,
        &quot;write-file-webpack-plugin&quot;: &quot;4.1.0&quot;,
        &quot;xss-filters&quot;: &quot;1.2.7&quot;
      }"><pre class="notranslate"><code class="notranslate">"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"
      }
</code></pre></div>
<p dir="auto">Also, this package does not have a github repository so I cannot file it there, but this is the source code in question - <a href="https://git.coolaj86.com/coolaj86/fs-walk.js/src/branch/master/lib/node-type-emitter.js#L53" rel="nofollow">https://git.coolaj86.com/coolaj86/fs-walk.js/src/branch/master/lib/node-type-emitter.js#L53</a></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?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto"><code class="notranslate">next export</code> should execute successfully</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">Running <code class="notranslate">npm install</code>, then <code class="notranslate">next build</code>, then <code class="notranslate">next export</code> will throw this error.</p>
<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>3.2.3</td>
</tr>
<tr>
<td>node</td>
<td>8.9.x</td>
</tr>
<tr>
<td>OS</td>
<td>osx @ latest</td>
</tr>
<tr>
<td>browser</td>
<td></td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">When using next.js with a custom-server, <code class="notranslate">publicRuntimeConfig</code> is undefined in the client.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Check the logs on these Codesandboxes:<br>
Working without a server: <a href="https://codesandbox.io/s/zxn9k1l483" rel="nofollow">hello-world</a><br>
Not working with a custom server: <a href="https://codesandbox.io/s/rr1v861l2p" rel="nofollow">custom-server-express</a></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto"><code class="notranslate">publicRuntimeConfig</code> to be as set in <code class="notranslate">next.config.js</code>.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>Version of Next.js: 7.0.2</li>
</ul>
<p dir="auto">What am I missing here? Is <code class="notranslate">getConfig</code> not supposed to work with a custom server? What would be the alternative?</p>