<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">I am not sure about this bug is due to antd or nextjs.</p>
<p dir="auto">it cannot use <code class="notranslate">Link</code> or <code class="notranslate">Router.push</code> to a page that contains antd component from a page not contains any antd component</p>
<p dir="auto">if there are three pages:<br>
page A: contain antd component<br>
page B and C: not contain antd component</p>
<p dir="auto">page B -&gt; page C : Success<br>
page A -&gt; page B : Success<br>
page A -&gt; page C : Success<br>
page B -&gt; page A : Failure<br>
page C -&gt; page A : Failure</p>
<h2 dir="auto">To Reproduce</h2>
<ul dir="auto">
<li>Clone the example project</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npx create-next-app --example with-ant-design-less with-ant-design-app"><pre class="notranslate"><code class="notranslate">npx create-next-app --example with-ant-design-less with-ant-design-app
</code></pre></div>
<ul dir="auto">
<li>Create a page without any antd component</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// pages/test.js

import Link from 'next/link';
import { useRouter } from 'next/router';

const TestPage = props =&gt; {
  const Router = useRouter();
  const goToIndexPage = e =&gt; {
    e.preventDefault();
    Router.push('/');
  };
  return (
    &lt;div&gt;
      &lt;a href=&quot;/&quot; onClick={goToIndexPage}&gt;
        Router push Test
      &lt;/a&gt;
      &lt;br /&gt;
      &lt;Link href=&quot;/&quot;&gt;
        &lt;a&gt;Link Test&lt;/a&gt;
      &lt;/Link&gt;
    &lt;/div&gt;
  );
};

export default TestPage;"><pre class="notranslate"><code class="notranslate">// pages/test.js

import Link from 'next/link';
import { useRouter } from 'next/router';

const TestPage = props =&gt; {
  const Router = useRouter();
  const goToIndexPage = e =&gt; {
    e.preventDefault();
    Router.push('/');
  };
  return (
    &lt;div&gt;
      &lt;a href="/" onClick={goToIndexPage}&gt;
        Router push Test
      &lt;/a&gt;
      &lt;br /&gt;
      &lt;Link href="/"&gt;
        &lt;a&gt;Link Test&lt;/a&gt;
      &lt;/Link&gt;
    &lt;/div&gt;
  );
};

export default TestPage;
</code></pre></div>
<ul dir="auto">
<li>Start project and enter to <code class="notranslate">localhost:3000/test</code> and try</li>
</ul>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Link and Router.push should work</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: 9 / 8</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">it can reproduce in <code class="notranslate">next@8</code> and <code class="notranslate">antd@3.9</code> too<br>
I built the project also, but it is the same behaviour</p>
<p dir="auto">This is bug report</p>
<p dir="auto">Link does not work with css-module imported. That happens when page with Link has no css, and linked page has. No errors in console, so im not sure about reasons, but there is minimal repo to reproduce:<br>
<a href="https://github.com/standy/next-css-error">https://github.com/standy/next-css-error</a></p>
<p dir="auto">Bug appears in <code class="notranslate">next@7.0.0</code> + <code class="notranslate">next-css@1.0.1</code>,<br>
Older <code class="notranslate">next@6.1.2</code> + <code class="notranslate">next-css@0.2.0</code> works fine</p>