TS complains "Object literal may only specify known properties, and 'colorMode' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'." #273
Setup a new Nuxt project with npx nuxi@latest init <project-name>
cd
npm i
npm i -D @nuxtjs/color-mode
Add to export default defineNuxtConfig({
colorMode: { preference: 'system', // default value of $colorMode.preference fallback: 'light', // fallback value if not system preference found hid: 'nuxt-color-mode-script', globalName: '__NUXT_COLOR_MODE__', componentName: 'ColorScheme', classPrefix: '', classSuffix: '-mode', storageKey: 'nuxt-color-mode' },
What is Expected?
No errors
What is actually happening?
TypeScript complains and errors are popping up as can be seen in the screenshot
Version
@nuxtjs/color-mode: 3.4.2 nuxt: 3.12.3
Steps to reproduce
npx nuxi@latest init <project-name>
export default defineNuxtConfig({
colorMode: { preference: 'system', // default value of $colorMode.preference fallback: 'light', // fallback value if not system preference found hid: 'nuxt-color-mode-script', globalName: '__NUXT_COLOR_MODE__', componentName: 'ColorScheme', classPrefix: '', classSuffix: '-mode', storageKey: 'nuxt-color-mode' },
What is Expected?
No errors
What is actually happening?
TypeScript complains and errors are popping up as can be seen in the screenshot