question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poppins 500 not downloading

See original GitHub issue

Nuxt 3 RC 6 + google-fonts 3.0.0-0

googleFonts: { families: { Poppins: { wght: [300, 400, 500, 600, 700], }, }, display: 'swap', prefetch: true, preconnect: false, download: true, base64: false, useStylesheet: false, },

Poppins is not downloaded in specified weights, missing 500.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
fnavarijocommented, Aug 23, 2022

I think I’ve found what is happening. The library depends on google-fonts-helper. This helps with the download of the fonts. When the execute method is called, it verifies that the .cache/nuxt-google-fonts exists. In case that it does, it returns (ref)

  // google-fonts-helpers
  if (!overwriting && fsExtra.pathExistsSync(cssPath)) {
      return;
    }

I was able to update my fonts adding the overwriting flag

// nuxt.config.js

export default defineNuxtConfig({
  modules: ['@nuxtjs/tailwindcss', '@nuxtjs/google-fonts'],
  googleFonts: {
    families: {
      Roboto: [100, 300],
      Lato: [100, 300, 500]
    },
    overwriting: true // this flag
  }
})

The downside, is that everytime your server restarts, will fetch the fonts again.

The other quick solution is removing node_modules/.cache/nuxt-google-fonts and starting the server again 😄

2reactions
asmeeeecommented, Aug 19, 2022

Same for Montserrat, it ignores all weights and injects only 400.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Fonts: Poppins
Geometric sans serif typefaces have been a popular design tool ever since these actors took to the world's stage. Poppins is one of...
Read more >
Poppins Font not working correctly
Poppins Font not working correctly · Go to Google fonts website to find a font, like Poppins · Specify the font for the...
Read more >
Poppins Font Weight 400, 500, 700, 800 do not apply - Bugs
Yes. I use google font by Bricks. The mentioned font weights are not working at all. Only 300, 600. Not sure if 900...
Read more >
Font family "Poppins" not working properly on my Website ...
I am trying to reference the typography from google fonts. The problem is that when I push the changes the font will be...
Read more >
Poppins | Adobe Fonts
Poppins is available via an open source license. You're free to use it with your Adobe Fonts account just as you would any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found