google-fonts-webpack-plugin icon indicating copy to clipboard operation
google-fonts-webpack-plugin copied to clipboard

Muli download fail in webpack build

Open atoupet-toki opened this issue 5 years ago • 5 comments

Hi! I tried to download Muli font in a not so older project (last build in novembre 2019) with webpack and got this error:

% building modules 358/358 modules 0 active(node:25615) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined at getVariantCss (PATH_TO_PROJECT/node_modules/google-fonts-webpack-plugin/src/GoogleWebfonts.js:23:25) at variants.forEach.variant (PATH_TO_PROJECT/node_modules/google-fonts-webpack-plugin/src/GoogleWebfonts.js:70:16) at Array.forEach (<anonymous>) at font.info.then.info (PATH_TO_PROJECT/node_modules/google-fonts-webpack-plugin/src/GoogleWebfonts.js:67:14) at process.internalTickCallback (internal/process/next_tick.js:77:7) (node:25615) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:25615) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I tried to replace this by another and works pretty well. Trid to use Muli in another project and it's failing with same code error. Do you guys get something on it ?? Thanks :)

atoupet-toki avatar Feb 19 '20 22:02 atoupet-toki

This happened to an existing project of mine as well, currently looking for a fix/alternative.

Syndesi avatar Jul 03 '20 03:07 Syndesi

I downloaded all required fonts with https://google-webfonts-helper.herokuapp.com/fonts and include them as static resources.

Syndesi avatar Jul 03 '20 04:07 Syndesi

Did the same thing .... but shoudnt be the solution :) We cannot use multiple solutions on multiple projects :)

atoupet-toki avatar Jul 03 '20 11:07 atoupet-toki

On Google Fonts Muli has been renamed to Mulish, which on the other hand works with the latest release.

So we can use Mulish and stuff works as expected.

Can be validated by visiting the Google Font repo which is a fork of vernobile MuliFont.

smoothie avatar Aug 07 '20 06:08 smoothie

i got the same error with the "Lato" font also

appzone avatar Feb 23 '21 03:02 appzone