Closed hoanghadu closed 2 years ago
VSCode show an error at the following lines when I open nuxt.config.ts file.
app: { theme: { meta: { name: 'Content Wind', author: 'Sebastien Chopin (@Atinux)', description: 'A lightweight Nuxt theme to build a Markdown driven website, based on Nuxt Content, TailwindCSS and Iconify ✨' } } }
The error message:
Type '{ theme: { meta: { name: string; author: string; description: string; }; }; }' is not assignable to type '{ baseURL?: string; buildAssetsDir?: string; assetsPath?: any; cdnURL?: string; head?: { [x: string]: any; charset?: string; viewport?: string; meta?: { [x: string]: any; }[]; link?: { [x: string]: any; }[]; style?: { [x: string]: any; }[]; ... 5 more ...; htmlAttrs?: { ...; }; }; }'. Object literal may only specify known properties, and 'theme' does not exist in type '{ baseURL?: string; buildAssetsDir?: string; assetsPath?: any; cdnURL?: string; head?: { [x: string]: any; charset?: string; viewport?: string; meta?: { [x: string]: any; }[]; link?: { [x: string]: any; }[]; style?: { [x: string]: any; }[]; ... 5 more ...; htmlAttrs?: { ...; }; }; }'.ts(2322) index.d.ts(833, 3): The expected type comes from property 'app' which is declared here on type 'NuxtConfig'
Shall be fixed now by using the app.config.
app.config
VSCode show an error at the following lines when I open nuxt.config.ts file.
The error message: