question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"SyntaxError: Invalid regular expression: invalid group specifier name" on Safari

See original GitHub issue

Version

module: 0.6.2 nuxt: 2.14.12

Nuxt configuration

mode:

  • universal
  • spa

Nuxt configuration

export default {
  // Target: https://go.nuxtjs.dev/config-target
  target: 'static',

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'sanity-test',
    htmlAttrs: {
      lang: 'en',
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
    ],
    link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
    // https://go.nuxtjs.dev/eslint
    '@nuxtjs/eslint-module',
    '@nuxtjs/sanity',
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {},

  // Sanity Configuration:
  sanity: {
    projectId: 'vgw104pb',
  },
}

Reproduction

Links:

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn’t been reported yet

Steps to reproduce

  1. Open the site link: https://sad-heyrovsky-54a894.netlify.app/ on Safari.
  2. View the console to see this error: SyntaxError: Invalid regular expression: invalid group specifier name

You can also test the GitHub repo locally.

Not sure if this is relevant but you can look at the sanity studio repo here: https://github.com/abdulrauf11/sanity-kitchen-sink/tree/main/studio

What is actually happening?

Screenshot 2021-01-31 at 2 28 32 AM

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
matthewlukedesigncommented, Jan 31, 2021

@danielroe - I was having the same issue and upgrading to 0.7.0 fixed it 😃

2reactions
danielroecommented, Jan 31, 2021

Thanks for spotting this. A server dependency with an unsupported RegExp (upath) was being included in the client build - should be fixed in v0.7.0. Let me know if not 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Works in Chrome, but breaks in Safari: Invalid regular ...
I had the same issue, and it turned out to be a RegEx expression in one of my dependencies, namely Discord.js .
Read more >
Safari will not load React App. Invalid regular expression
The error concern "Invalid regular expression: invalid group specifier name". A google search revealed that Safari does not support all ...
Read more >
SyntaxError: Invalid regular expression: invalid group ... - GitHub
I think this error is due to the fact that Safari does not support the "lookbehind" in regex. SyntaxError: Invalid regular expression: invalid ......
Read more >
Angular SyntaxError - Apple Developer
Angular SyntaxError: SyntaxError: Invalid regular expression: invalid group specifier name.
Read more >
Regex works in chrome, but breaks in safari: invalid regular ...
[Solved] Regex works in chrome, but breaks in safari: invalid regular expression: invalid group specifier name - CodeProject.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found