DEV Community


Posted on • Updated on

NextJS throws error on navigating from the page that imports a script in the head tag

I have been facing an issue with NextJS. I tried to import a CDN script on a particular page. It works on the first load but then throws an error whenever I navigate to another page, thereby making it unusable when navigating to the initial page.

import React, { useState,

Discussion (0)