<p dir="auto">Hello,<br>
it seems that nextjs' router has a trouble on Windows filesystem, generating code like this:</p>
<p dir="auto"><code class="notranslate">window.__NEXT_REGISTER_PAGE('/page\subpage', function() { ...</code></p>
<p dir="auto">which ultimately leads to syntax error "Invalid Unicode escape sequence"</p>
<p dir="auto">I am quite new when it comes to node, so I might be wrong, but fix should be in using nodejs "path" utility and its "normalize" or "resolve" functions to generate paths like these. See <a href="https://shapeshed.com/writing-cross-platform-node/#use-path-normalize-to-create-reliable-paths" rel="nofollow">https://shapeshed.com/writing-cross-platform-node/#use-path-normalize-to-create-reliable-paths</a></p>
<p dir="auto">Thank you,<br>
David S.</p>
<p dir="auto">from slack channel</p>
<blockquote>
<p dir="auto">aktxyz [12:36 PM]<br>
I just updated my nextjs to the latest 2.3.0-alpha1 ... and my  navigation tags stopped working, I tried older versions one by one, and the  nav components stopped working on the jump from 2.1.1 to 2.2.0<br>
before digging around ... any thoughts on what may be causing this?<br>
aktxyz [12:43 PM]<br>
the routeChangeStart event fires, but the routeChangeComplete never fires<br>
aktxyz [1:25 PM]<br>
it looks like the  issue I am seeing is limited to subdirectories under pages ...<br>
this works About<br>
this fails About<br>
[1:25]<br>
where pages/about.js AND pages/App/about.js both exist</p>
</blockquote>
<p dir="auto">This ended up being related to back slashes, I solved by changing this line</p>
<p dir="auto"><a href="https://github.com/zeit/next.js/blob/master/server/build/plugins/pages-plugin.js#L15">https://github.com/zeit/next.js/blob/master/server/build/plugins/pages-plugin.js#L15</a></p>
<p dir="auto">from</p>
<p dir="auto"><code class="notranslate">const routeName = </code>/${pageName.replace(/[/\]?index$/, '')}``</p>
<p dir="auto">to</p>
<p dir="auto"><code class="notranslate">const routeName = </code>/${pageName.replace(/[/\]?index$/, '')}<code class="notranslate">.replace(/\\/g, '/')</code></p>
<p dir="auto">There is probably a more elegant way or place to do this, can someone chime in on thoughts for this?</p>