title: Next.JS implement external ".js" with <script>
body: <p>Im Building a website with Next.Js and I tried to implement an external .js file (Bootstrap.min.js &amp; Popper.min.js) but it is not displayed.
  Im not sure what the problem is!</p>
  
  <p>I implemented it like this:
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import Head from 'next/head';
  
  //partials
  import Nav from './nav'
  
  const Layout = (props) =&gt; (
  &lt;div&gt;
      &lt;Head&gt;
          &lt;title&gt;Site&lt;/title&gt;
  
          {/* Meta tags */}
          &lt;meta charset="utf-8"&gt;&lt;/meta&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;&lt;/meta&gt;
          
          {/* Standard page css */}
          &lt;link rel="stylesheet" type="text/css" href="/static/css/page.css"/&gt;
          
          {/* Bootstrap CSS */}
          &lt;link rel="stylesheet" href="/static/includes/bootstrap.min.css"/&gt;
  
          {/* jQuery first, then Popper.js, then Bootstrap JS */}
          &lt;script src="/static/includes/popper.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/static/includes/bootstrap.min.js"&gt;&lt;/script&gt;
          
      &lt;/Head&gt;
      &lt;Nav/&gt;
      {props.children}
  &lt;/div&gt;
  );
  
  export default Layout;</code></pre>
  </div>
  </div>
  </p>
  
  <p>It looks good to me? what am I missing, it's not projecting as it should!</p>
  
  <p>When I tried a script inside the page it shows "Hello JavaScript" for a very short time and then it disappears? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p id="demo"&gt;&lt;/p&gt;
  &lt;script&gt;document.getElementById("demo").innerHTML = "Hello JavaScript";&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How do i fix it? </p>
  
  <p>Please help!</p>
  
  <p>Im Using:
      "next": "^8.0.3",
      "react": "^16.8.4",
      "react-dom": "^16.8.4"</p>