Javascript – Getting 'navigator is not defined' error while creating Next JS build
I have created a custom hook in Next JS to get network online status using JS navigator.onLine property. The code ran fine locally. However, when I ran npm run build to build the project, it threw me the following error…