Plugin "netlify-plugin-inline-critical-css" failed

When trying to build we are getting the following error. Nothing has changed in the codebase from our side for this to happen. It is blocking us from building please can someone advise how we can fix this.

Using node 14.15.0.

8:37:39 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (
8:37:38 AM: Plugin "netlify-plugin-inline-critical-css" failed            
8:37:38 AM: ────────────────────────────────────────────────────────────────
8:37:38 AM: ​
8:37:38 AM:   Error message
8:37:38 AM:   SyntaxError: 'noscript)>[rel="stylesheet"]' is not a valid selector
8:37:38 AM: ​
8:37:38 AM:   Plugin details
8:37:38 AM:   Package:        netlify-plugin-inline-critical-css
8:37:38 AM:   Version:        2.0.0
8:37:38 AM:   Repository:     git+
8:37:38 AM:   npm link:
8:37:38 AM:   Report issues:
8:37:38 AM: ​
8:37:38 AM:   Error location
8:37:38 AM:   In "onPostBuild" event in "netlify-plugin-inline-critical-css" from Netlify app
8:37:38 AM: ​
8:37:38 AM:   Resolved config
8:37:38 AM:   build:
8:37:38 AM:     base: /opt/build/repo/gatsby
8:37:38 AM:     command: npm run build && cp _redirects public/_redirects
8:37:38 AM:     commandOrigin: config
8:37:38 AM:     environment:
8:37:38 AM:       - CHANNEL_ID
8:37:38 AM:       - GATSBY_DOMAIN_NAME
8:37:38 AM:       - SLACK_TOKEN
8:37:38 AM:     publish: /opt/build/repo/gatsby/public
8:37:38 AM:     publishOrigin: config
8:37:38 AM:   functionsDirectory: /opt/build/repo/gatsby/functions
8:37:38 AM:   headers:
8:37:39 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:37:39 AM: Failing build: Failed to build site
8:37:40 AM: Finished processing build request in 3m35.254s

Hi there, glad you found us :wave: before we can help you, we need a little more information on the issues you are facing.

First, have you looked through this resource? It is a compilation of all of our build and deploy resources. This is a good starting point.

If you have worked through those guides and are still encountering issues please share the following information:

  • the name of your build instance: “
  • what you have already tried
  • any error messages you have received in your terminal window or in the developer console