googleFonts does not exist in type 'NuxtConfig'
See original GitHub issuepackage.json
"@nuxtjs/google-fonts": "^3.0.0-1",
nuxt.config.ts
modules: ["@nuxtjs/google-fonts"],
googleFonts: {
display: 'swap',
useStylesheet: true,
inject: true,
download: true,
families: {
'Inter': [300, 400, 500, 600, 700],
'Open Sans': [300, 400, 500, 600, 700]
}
error: Object literal may only specify known properties, and ‘googleFonts’ does not exist in type 'NuxtConfig’
Issue Analytics
- State:
- Created 10 months ago
- Reactions:5
- Comments:8
Top Results From Across the Web
Google font import not working with NuxtJS component style
Running Nuxt locally works, but once deployed quite a few things seem to not work as intended. My question in this instance is...
Read more >Options - nuxtjs/google-fonts
The font-display property lets you control what happens while the font is still loading or otherwise unavailable. Type: String Default: 'swap'.
Read more >Adding Google Fonts to your NuxtJS site - Elian Codes
Adding fonts to your NuxtJS configuration is very easy. You just have to add them in the nuxt.config.js file. There's a lot of...
Read more >How can I properly integrate Google Fonts into Nuxt.js?
There are two proper ways to integrate Google Fonts or any other font library into Nuxt.js. The Quick way. Copy the Embed Link...
Read more >@nuxtjs/google-fonts - npm
Google Fonts module for Nuxt. Latest version: 2.0.0, last published: 5 months ago. Start using @nuxtjs/google-fonts in your project by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After reading the issues a little bit I could find the reason of the problem with Nuxt3, it’s because you have to install the pre-release version of this package, see below:
_Originally posted by @iamandrewluca in https://github.com/nuxt-community/google-fonts-module/issues/107#issuecomment-1300924762_
Even with the prerelease tag, Nuxt can’t spin up the dev server.
Cannot restart nuxt: Cannot find module '/.../webapp/node_modules/@nuxtjs/google-fonts/dist/module.js'. Please verify that the package.json has a valid "main" entry