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

Doesn't work with expo/next-adapter instructions

Open codinsonn opened this issue 3 years ago • 3 comments

Tried using this in next.js as described in docs here:

  • https://docs.expo.dev/versions/latest/sdk/font/
  • https://docs.expo.dev/guides/using-nextjs/?redirected#font-support

But even with next-fonts in my next.config, I still get load errors:

Expected font asset of type `string | FontResource | Asset` (number is not supported on web) instead got: null

@byCedric @EvanBacon Is there an up-to-date working example of using Expo + Next.js + (Google) Font Loading?

(I'll see if I can include a minimal repro soon, but for now just following the instructions seems to trigger the error / prevent font loading)

codinsonn avatar Jan 02 '22 17:01 codinsonn

@codinsonn Hey have you figured out a solution?

iam-yan avatar Feb 19 '22 10:02 iam-yan

@codinsonn

Hey have you figured out a solution?

I'm afraid not, went with different setups for Next and React-Native in the end

codinsonn avatar Feb 19 '22 10:02 codinsonn

@codinsonn Hey have you figured out a solution?

I'm afraid not, went with different setups for Next and React-Native in the end

Can you share some clues?

I am following the guide to use Next with Expo, however the font doesn't work... Furthermore Next12 can't work neither. I guess it is because of WP5, because it works well when I rolled back to Next11...

How did you make them work?

iam-yan avatar Feb 19 '22 12:02 iam-yan