Skip to content

Not able to import GeistSans #172

@SidKumarSingh

Description

@SidKumarSingh

Font Name (Geist Sans/Geist Mono):

  • Geist Sans
  • Geist Mono

Description of the Issue:
I have scaffolded a Vite+react-ts project and installed Geist from the npm. When I use the statement
import { GeistSans } from "geist/font/sans"
in main.tsx to import the font, an error is logged in the console as below:
sans.js:3 Uncaught TypeError: (0 , import_local.default) is not a function at sans.js:3:26 (anonymous) @ sans.js:3

Steps to Reproduce:

  1. Scaffold vite+react-ts project using npm create
  2. Install Geist from npm
  3. import GeistSans in main.tsx
  4. Run npm dev run
  5. Error is logged in the browser console and no content is displayed.

Expected Behavior:
No error on import and GeistSans.variable should be exposed for use to the JS environment

Environment (please complete the following information):

  • OS: AWS CodeCatalyst
  • Software: VS Code, Microsoft Edge browser
  • Version of the Font: latest from npm

Additional comments
Tried with GeistMono and same result

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions