Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error 500 Internal server error on devtools scripts panel #481

@Kumzy

Description

@Kumzy

Hello, when trying to access through DevTools to the Scripts panel, I have an error 500 on the panel with the following error

can't convert undefined to object

I can not find any logs to see where the error comes from.

Here is part of my nuxt.config.ts (excluded some parts)

export default defineNuxtConfig({
  devtools: {
    enabled: true,
  },
runtimeConfig: {
    public: {
      scripts: {
        googleAnalytics: {
          id: "",
        },
        clarity: {
          id: "",
        },
        googleTagManager: {
          id: "",
        },
      },
    },
  },
modules: [
    "@vueuse/nuxt",
    "@nuxtjs/i18n",
    "@nuxt/image",
    "@nuxtjs/sitemap",
    "@nuxtjs/robots",
    "nuxt-schema-org",
    "nuxt-og-image",
    "nuxt-link-checker",
    "nuxt-seo-utils",
    "@vee-validate/nuxt",
    "@nuxt/content",
    "@dargmuesli/nuxt-cookie-control",
    "nuxt-security",
    "nuxt-viewport",
    "@nuxt/scripts",
  ],
scripts: {
    enabled: true,
    debug: true,
    registry: {
      googleTagManager: true,
      clarity: true,
      googleAnalytics: true,
    },
  },
});

I am running Nuxt4

Also I could not reproduce using Stackblitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions