`\n\nUnable to use stroke-width does not take effect",[],364,"nuxt","icon","open","Unable to use stroke-width does not take effect","2025-03-04T02:48:19Z","https://github.com/nuxt/icon/issues/364",0.79931027,{"description":1993,"labels":1994,"number":2004,"owner":1985,"repository":2005,"state":2006,"title":2007,"updated_at":2008,"url":2009,"score":2010},"I'm setting up the nuxt-vitest module in my project. Though I'm running into some issues getting a simple test, I use mountSuspended(Logo) to test the mounting of a Logo component. This component uses i18n. Whereas when I'm using mount from Vitest the test passes.\r\n\r\nThe error I'm getting is as follows:\r\n```\r\nVitest caught 1 unhandled error during the test run.\r\nThis might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nSyntaxError: Need to install with `app.use` function\r\n ❯ Module.createCompileError ../node_modules/.pnpm/@intlify+message-compiler@9.3.0-beta.17/node_modules/@intlify/message-compiler/dist/message-compiler.mjs:54:19\r\n ❯ createI18nError ../node_modules/.pnpm/vue-i18n@9.3.0-beta.17_vue@3.3.4/node_modules/vue-i18n/dist/vue-i18n.runtime.mjs:97:34\r\n 96| [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\r\n 97| [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\r\n 98| [I18nErrorCodes.NOT_INSLALLED]: 'Need to install with `app.use` function',\r\n | ^\r\n 99| [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\r\n 100| [I18nErrorCodes.NOT_AVAILABLE_IN_LEGACY_MODE]: 'Not available in legacy mode',\r\n ❯ Module.useI18n ../node_modules/.pnpm/vue-i18n@9.3.0-beta.17_vue@3.3.4/node_modules/vue-i18n/dist/vue-i18n.runtime.mjs:2253:15\r\n ❯ setup app.vue:33:40\r\n```\r\n\r\nAnd while we are at it. Is there a way to test with the translated i18n messages iso the keys?\r\n\r\n######\r\n\r\nHere are some snippets from my configuration.\r\nvitest.config.js\r\n```\r\n...\r\nexport default defineVitestConfig({\r\n resolve: {\r\n alias\r\n },\r\n test: {\r\n dir: tests,\r\n setupFiles: ['tests/unit.setup.ts'],\r\n environment: 'jsdom',\r\n globals: true,\r\n root: rootDir,\r\n environmentOptions: {\r\n nuxt: {\r\n rootDir\r\n }\r\n }\r\n }\r\n})\r\n```\r\n\r\n./test/nuxt/components/Logo.nuxt.spec.ts (with mountSuspended)\r\n```\r\nimport { describe, it, expect } from 'vitest'\r\n\r\nimport { mountSuspended } from 'vitest-environment-nuxt/utils'\r\nimport Logo from '@/components/header/Logo.vue'\r\n\r\ndescribe('HeaderLogo', () => {\r\n it('can mount some component', async () => {\r\n const component = await mountSuspended(Logo)\r\n expect(component.vm).toBeTruthy()\r\n expect(component.text()).toMatchInlineSnapshot(\r\n '\"global.logo-brand-name.global.logo-brand-localehomepage.logo-tagline\"'\r\n )\r\n })\r\n})\r\n```\r\n./tests/unit.setup.ts\r\n```\r\nimport { config } from '@vue/test-utils'\r\nimport { createI18n } from 'vue-i18n'\r\n\r\nimport nlNL from '~/locales/nl_NL.json'\r\n\r\nconst i18n = createI18n({\r\n legacy: false,\r\n locale: 'nl_NL',\r\n missing: (_, key) => key,\r\n messages: {\r\n nlNL\r\n }\r\n})\r\n\r\nconfig.global.mocks = {\r\n t: msg => msg\r\n}\r\nconfig.global.plugins.push(i18n)\r\n```\r\n\r\n\r\n./tests/nuxt/components/Logo.nuxt.spec.ts (without mountSuspended)\r\n```\r\nimport { mount } from '@vue/test-utils'\r\nimport { describe, it, expect } from 'vitest'\r\n\r\nimport Logo from '@/components/header/Logo.vue'\r\n\r\ndescribe('HeaderLogo', () => {\r\n it('can mount some component', () => {\r\n const component = mount(Logo)\r\n expect(component.vm).toBeTruthy()\r\n expect(component.text()).toMatchInlineSnapshot(\r\n '\"global.logo-brand-name.global.logo-brand-localehomepage.logo-tagline\"'\r\n )\r\n })\r\n})\r\n```\r\n\r\n",[1995,1998,2001],{"name":1996,"color":1997},"vitest-environment","b60205",{"name":1999,"color":2000},"needs reproduction","DE7793",{"name":2002,"color":2003},"closed-by-bot","ededed",585,"test-utils","closed","mountSuspended with i18n","2025-01-22T12:49:12Z","https://github.com/nuxt/test-utils/issues/585",0.74140316,{"description":2012,"labels":2013,"number":2014,"owner":1985,"repository":2005,"state":2006,"title":2015,"updated_at":2016,"url":2017,"score":2018},"link \"See module options\" in https://github.com/nuxt/test-utils not found\r\nlink \"Setup\" in https://test-utils.nuxtjs.org/api-reference/setup not worked",[],491,"page https://test-utils.nuxtjs.org/options not found","2023-12-02T00:13:13Z","https://github.com/nuxt/test-utils/issues/491",0.7418138,{"description":2020,"labels":2021,"number":2031,"owner":1985,"repository":2032,"state":2006,"title":2033,"updated_at":2034,"url":2035,"score":2036},"### For what version of Nuxt UI are you suggesting this?\n\nv3.0.0-alpha.x\n\n### Description\n\nChart is one of many things found when developing a statistics such as in dashboard admin. It would be good if nuxt ui have this component.\n\n### Additional context\n\n_No response_",[2022,2025,2028],{"name":2023,"color":2024},"duplicate","cfd3d7",{"name":2026,"color":2027},"enhancement","a2eeef",{"name":2029,"color":2030},"v3","49DCB8",2673,"ui","Chart component","2024-11-18T08:33:07Z","https://github.com/nuxt/ui/issues/2673",0.7418621,{"description":2038,"labels":2039,"number":2043,"owner":1985,"repository":2044,"state":2006,"title":2045,"updated_at":2046,"url":2047,"score":2048},"### 🐛 The bug\n\nUpdated Nuxt and all modules to the latest and getting the error in the title. Worked without issues before. \n\nHere is the error stack: \n```\nGAnalytics.ts:20 Error: useHead() was called without provide context, ensure you call it through the setup() function.\n at injectHead (vue.BYLJNEcq.mjs?v=1c7113e8:26:9)\n at useScript (vue.cHBs6zvy.mjs?v=1c7113e8:34:33)\n at useScript (useScript.js?v=1c7113e8:30:20)\n at useRegistryScript (utils.js?v=1c7113e8:48:10)\n at useScriptGoogleAnalytics (google-analytics.js?v=1c7113e8:9:10)\n at Object.trackEvent (GAnalytics.ts:4:25)\n```\n\nI use this composable for firing GA events: \n```\nexport const useGAnalytics = () => {\n const trackEvent = (eventName: string, params: any = null) => {\n try {\n const { proxy } = useScriptGoogleAnalytics();\n\n proxy.gtag(\"event\", eventName, params);\n } catch (error) {\n console.error(error);\n }\n };\n return {\n trackEvent,\n };\n};\n```\nI simply call trackEvent in various places, script tags, on event listeners on a button, etc. Worked fine before. \n\nThe bug can be seen in the reproduction. If you try to navigate between pages, the error occurs\n\n### 🛠️ To reproduce\n\nhttps://stackblitz.com/edit/github-cabjusrz?file=pages%2Fabout.vue,composables%2FGA.ts\n\n### 🌈 Expected behavior\n\nExpected events to fire without throwing an error. \n\n### ℹ️ Additional context\n\n_No response_",[2040],{"name":2041,"color":2042},"bug","d73a4a",437,"scripts","useHead() was called without provide context, ensure you call it through the setup() function","2025-03-25T15:37:19Z","https://github.com/nuxt/scripts/issues/437",0.7571803,{"description":2050,"labels":2051,"number":2056,"owner":1985,"repository":2032,"state":2006,"title":2057,"updated_at":2058,"url":2059,"score":2060},"### Description\n\nI can see there was some changes [here](https://github.com/nuxt/ui/pull/3123) which is great.\n\nI'm just wondering why the 'help' property was excluded from these additions?\n\nThank you!",[2052,2055],{"name":2053,"color":2054},"question","d876e3",{"name":2029,"color":2030},3685,"Was UFormField 'help' property excluded from the aria-describedby update for any specific reason?","2025-03-26T12:47:39Z","https://github.com/nuxt/ui/issues/3685",0.7653733,{"description":2062,"labels":2063,"number":2066,"owner":1985,"repository":2032,"state":2006,"title":2067,"updated_at":2068,"url":2069,"score":2070},"### Description\n\nThe concepts of Chips and Badges are reversed. \n\nChip is the component with text, to represent status or options selected, that can also have counters, icons aside labels and in some cases a remove button.\nBadge is the component that have a notification or a counter\n\nIn my opinion:\n\nThis is a chip ⤵️\n\n\nAnd this is a Badge ⤵️\n\n\nAn example\nhttps://medium.com/design-bootcamp/ux-blueprint-03-badges-vs-chips-tags-a-friendly-guide-e38ab2217be3#:~:text=Key%20Differences,users%20navigate%20and%20manage%20content.",[2064,2065],{"name":2053,"color":2054},{"name":2029,"color":2030},3282,"The concepts of Chips and Badges are reversed","2025-02-10T09:38:39Z","https://github.com/nuxt/ui/issues/3282",0.7681407,{"description":2072,"labels":2073,"number":2074,"owner":1985,"repository":2075,"state":2006,"title":2076,"updated_at":2077,"url":2078,"score":2079},"\n\nCursor should be a pointer on collapsable Categories titles",[],1153,"nuxt.com","[Docs] Add pointer on collapsables categories titles","2023-09-05T08:18:52Z","https://github.com/nuxt/nuxt.com/issues/1153",0.7744802,{"description":2081,"labels":2082,"number":2085,"owner":1985,"repository":2075,"state":2006,"title":2086,"updated_at":2087,"url":2088,"score":2089},"+ Maybe Agencies aside",[2083],{"name":2026,"color":2084},"1ad6ff",1128,"[Refactor] Group modules and showcase components","2023-02-15T12:31:10Z","https://github.com/nuxt/nuxt.com/issues/1128",0.7755408,{"description":2091,"labels":2092,"number":2095,"owner":1985,"repository":2075,"state":2006,"title":2096,"updated_at":2097,"url":2098,"score":2099},"\n\nI believe we should add a check here to make sure the data is correct, otherwise throw (will fallback to the toast error): https://github.com/nuxtlabs/nuxt.com/blob/dev/composables/useProjectComponents.ts#L29\n",[2093],{"name":2041,"color":2094},"ff281a",489,"Editor cannot load if preview has not `/api/component-meta`","2022-05-11T14:14:55Z","https://github.com/nuxt/nuxt.com/issues/489",0.7834488,["Reactive",2101],{},["Set"],["ShallowReactive",2104],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"Ooo76bPW4U_Vh1MJdDyl3M9ZlMfrsgBIULxpHixqX9g":-1},"/nuxt/ui/3440"]