apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.

Home Page:https://www.npmjs.com/package/nextjs-progressbar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expected server HTML to contain a matching <style> in <div>.

DavidIlie opened this issue · comments

Can you please run Node.js with the --enable-source-maps option? You can either define it by doing node --enable-source-maps . or by setting the NODE_OPTIONS environment variable with it as a value.

Without source maps, it's hard to determine what is the code that is erroring.

I can't seem to enable that for Next.js:

NODE_OPTIONS=--enable-source-maps yarn dev

This is what I am trying and the error looks the same.

Ignore my last comment. I forgot I'm talking about nextjs sorry. But in nextjs development environment, by default sourcemap is enabled. So probably u r using an old version of nextjs-progressbar and older versions don't provide sourcemap. Can u try upgrading it?

I am running the latest version of Next.js

image

I am running the latest version of Next.js

image

Not next I mean nextjs-progressbar

image

I am currently running nextjs-progressbar not nextjs-nprogressbar is there a difference with that?

No sorry typo. If u r using 0.0.14, you should get the sourcemap.

Now

  1. Can u run yarn why nextjs-progressbar
  2. Can u provide a minimal repro so I can test this out.

same problem. I just switched from nprogress hoping you fixed it. That code has the same bug.

same problem. I just switched from nprogress hoping you fixed it. That code has the same bug.

Can you provide a minimal code sample which is causing the issue? I'm not able to reproduce the issue. That said can u check these 2 issues and solutions seems like your issue is related to these issues
vercel/next.js#8998
vercel/next.js#25489

as far as I know, I have a typical nextjs typescript project with tailwind. Are you looking in the Browser's console for the warning?

Hey, I figured it out.

We hired this hipster coder and he added this hack to our code.

I removed the isServer check and it worked. I think this was needed for nextjs back in the day?

const App = () => {
      if (isServer) 
          return null;

   return <App></App>
}

const isServer = () => typeof window === 'undefined';

Closing this issue. If anyone else has this issue please follow up with a minimal reproducible code sample.