vercel / geist-font

https://vercel.com/font
SIL Open Font License 1.1
2.13k stars 54 forks source link

RollupError when using Geist with Remix (Vite) #107

Open AmruthPillai opened 1 month ago

AmruthPillai commented 1 month ago

Font Name (Geist Sans/Geist Mono):

Description of the Issue: When running the dev or build command, I get this error:

> remix vite:build

vite v5.2.11 building for production...
✓ 117 modules transformed.
x Build failed in 515ms
Error [RollupError]: node_modules/.pnpm/geist@1.3.0_next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1_/node_modules/geist/dist/sans.js (1:7): "default" is not exported by "node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/local/index.js", imported by "node_modules/.pnpm/geist@1.3.0_next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1_/node_modules/geist/dist/sans.js".
file: /path/to/project/node_modules/.pnpm/geist@1.3.0_next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1_/node_modules/geist/dist/sans.js:1:7
1: import localFont from "next/font/local";
          ^
2: 
3: export const GeistSans = localFont({
    at getRollupError (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/parseAst.js:394:41)
    at error (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/parseAst.js:390:42)
    at Module.error (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:13855:16)
    at Module.traceVariable (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:14303:29)
    at ModuleScope.findVariable (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:11984:39)
    at Identifier.bind (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:6908:40)
    at CallExpression.bind (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
    at CallExpression.bind (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:9135:15)
    at VariableDeclarator.bind (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
    at VariableDeclaration.bind (file:///path/to/project/node_modules/.pnpm/rollup@4.17.2/node_modules/rollup/dist/es/shared/node-entry.js:4771:28) {
  binding: 'default',
  code: 'MISSING_EXPORT',
  exporter: '/path/to/project/node_modules/.pnpm/next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/local/index.js',
  id: '/path/to/project/node_modules/.pnpm/geist@1.3.0_next@14.2.3_@babel+core@7.24.5_react-dom@18.3.1_react@18.3.1__react@18.3.1_/node_modules/geist/dist/sans.js',
  url: 'https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module',

Steps to Reproduce:

  1. Setup a new Remix project
  2. Install Geist
  3. Use Geist

Environment (please complete the following information):