Skip to content
Advertisement

Why I’m getting CssSyntaxError of missing semicolon in Gatsby build?

I’m working on a Gatsby page using Material UI. The page design is almost complete, but when I’m finished, I get a strange build error on npm run build.

WebpackError: Pathname: /invitation/ CssSyntaxError: <css input>:1479:28: Miss
  ed semicolon

Error sccreenshot

I have no idea where this error is coming from, but I’ve spent several hours trying to resolve it with no success. Is anyone able to assist me with this?

If the component code is required, please let me know so I can update the thread with the code that is causing the problem.

Advertisement

Answer

I discovered the source of the error that was caused by the make styles CSS command.

 '.MuiButton-root:hover': {
      backgroundColor: '#F8E71C',
   },

I commented this line out and the build started working fine, but I’m still not sure why this is causing an error.

Is there anyone who can explain what caused the error?

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement