<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">npm run build with invokes 'next build' is hanging forever.</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Cannot specify steps to reproduce because it suddenly not</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">It should build normally so that I can run npm start.</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">If applicable, add screenshots to help explain your problem.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/562164/41755515-0a9baf52-7602-11e8-83d9-e910fdb90fbe.png"><img src="https://user-images.githubusercontent.com/562164/41755515-0a9baf52-7602-11e8-83d9-e910fdb90fbe.png" alt="image" style="max-width: 100%;"></a></p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: [e.g. macOS, Windows]</li>
<li>Browser (if applies) [e.g. chrome, safari]</li>
<li>Version of Next.js: [e.g. 6.0.2]</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">Add any other context about the problem here.</p>
<ul dir="auto">
<li>[x ] 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">Expected Behavior</h2>
<p dir="auto">npm run build - expect to build for deploy</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">receive an error:</p>
<blockquote>
<blockquote>
<p dir="auto">Failed to build on C:\Users\psycu\AppData\Local\Temp\6d75aadf-8045-42b3-9a00-69e315dbec1c<br>
{ Error: commons.js from UglifyJs<br>
Unexpected token: name (onClickOutside) [commons.js:94268,33]<br>
at D:\Sites\training\boilerplates\with-mobx\node_modules\next\dist\server\build\index.js:182:21<br>
at emitRecords.err (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:269:13)<br>
at Compiler.emitRecords (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:375:38)<br>
at emitAssets.err (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:262:10)<br>
at applyPluginsAsyncSeries1.err (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:368:12)<br>
at next (D:\Sites\training\boilerplates\with-mobx\node_modules\tapable\lib\Tapable.js:218:11)<br>
at Compiler.compiler.plugin (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)<br>
at Compiler.applyPluginsAsyncSeries1 (D:\Sites\training\boilerplates\with-mobx\node_modules\tapable\lib\Tapable.js:222:13)<br>
at Compiler.afterEmit (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:365:9)<br>
at require.forEach.err (D:\Sites\training\boilerplates\with-mobx\node_modules\webpack\lib\Compiler.js:354:15)<br>
errors: [ 'commons.js from UglifyJs\nUnexpected token: name (onClickOutside) [commons.js:94268,33]' ],<br>
warnings: [] }<br>
npm ERR! code ELIFECYCLE<br>
npm ERR! errno 1<br>
npm ERR! with-mobx@1.0.0 build: <code class="notranslate">next build</code><br>
npm ERR! Exit status 1<br>
npm ERR!<br>
npm ERR! Failed at the with-mobx@1.0.0 build script.<br>
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.</p>
</blockquote>
</blockquote>
<p dir="auto">npm ERR! A complete log of this run can be found in:<br>
npm ERR!     C:\Users\psycu\AppData\Roaming\npm-cache_logs\2017-10-28T13_26_00_550Z-debug.log</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">im using firebase,mobx,emotion libraries.<br>
on dev mode everything for fine, but buil cannot be completed.</p>
<p dir="auto">I think it maybe some connection to my .babelrc file that include:</p>
<p dir="auto"><code class="notranslate">{ "presets": [ "next/babel" ], "plugins": [ "transform-decorators-legacy", [ "transform-assets-import-to-string", { "baseDir": "static", "baseUri": "/" } ], [ "emotion", { "inline": true } ] ] }</code></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>latest</td>
</tr>
<tr>
<td>node</td>
<td>8.5.0</td>
</tr>
<tr>
<td>OS</td>
<td>windows 10 64bit</td>
</tr>
<tr>
<td>browser</td>
<td>chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>