Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Rejection (Error): Cannot load null or undefined font source: { "percolate": undefined }. Expected asset of type FontSource for fontFamily of name: "percolate" #534

Closed
DohertyC12 opened this issue Sep 23, 2021 · 1 comment

Comments

@DohertyC12
Copy link

Does anyone have a working repo of the Storybook for RN?
Unhandled Rejection (Error): Cannot load null or undefined font source: { "percolate": undefined }. Expected asset of type FontSource for fontFamily of name: "percolate"

To Reproduce

  1. Follow Storybook for RN tutorial
    https://storybook.js.org/tutorials/intro-to-storybook/react-native/en/get-started/
    Links were out of date for Add Assets here - I found the closest but I think I'm missing some files:
    https://github.com/chromaui/learnstorybook-code/branches/master/src/assets/icon
    https://github.com/google/fonts/trunk/ofl/nunitosans assets/font
  2. Ran "yarn web" to start app in browser, "yarn storybook" to run Storybook in browser, got this error:
    ×
    Unhandled Rejection (Error): Cannot load null or undefined font source: { "percolate": undefined }. Expected asset of type FontSource for fontFamily of name: "percolate"
    loadFontInNamespaceAsync$
    C:/Users/erdohert/Repos/src/Font.ts:96
    93 | return await loadFontInNamespaceAsync(fontFamilyOrFontMap, source);
    94 | }
    95 |
    96 | async function loadFontInNamespaceAsync(
    97 | fontFamily: string,
    98 | source?: FontSource | null
    99 | ): Promise {

System:
Please paste the results of npx -p @storybook/cli@next sb info here.
Environment Info:

System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Binaries:
Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 92.0.4515.159
Edge: Spartan (44.22000.120.0), Chromium (92.0.902.84)
npmPackages:
@storybook/addon-actions: ^5.3 => 5.3.21
@storybook/addon-knobs: ^5.3 => 5.3.21
@storybook/addon-links: ^5.3 => 5.3.21
@storybook/addon-ondevice-actions: ^5.3.23 => 5.3.23
@storybook/addon-ondevice-knobs: ^5.3.25 => 5.3.25
@storybook/addon-storyshots: ^6.3.7 => 6.3.7
@storybook/react-native: ^5.3.25 => 5.3.25
@storybook/react-native-server: ^5.3.23 => 5.3.23

Context

@jonniebigodes
Copy link
Collaborator

Closing this in favor of #608 as to have only one place for the changes to the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants