geist-font icon indicating copy to clipboard operation
geist-font copied to clipboard

RollupError when using Geist with Remix (Vite)

Open AmruthPillai opened this issue 1 year ago • 0 comments

Font Name (Geist Sans/Geist Mono):

  • [x] Geist Sans
  • [x] 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/[email protected][email protected]_@[email protected][email protected][email protected][email protected]_/node_modules/geist/dist/sans.js (1:7): "default" is not exported by "node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/font/local/index.js", imported by "node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected][email protected]_/node_modules/geist/dist/sans.js".
file: /path/to/project/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected][email protected]_/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/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:394:41)
    at error (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:390:42)
    at Module.error (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:13855:16)
    at Module.traceVariable (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:14303:29)
    at ModuleScope.findVariable (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:11984:39)
    at Identifier.bind (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:6908:40)
    at CallExpression.bind (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
    at CallExpression.bind (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:9135:15)
    at VariableDeclarator.bind (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
    at VariableDeclaration.bind (file:///path/to/project/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:4771:28) {
  binding: 'default',
  code: 'MISSING_EXPORT',
  exporter: '/path/to/project/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/font/local/index.js',
  id: '/path/to/project/node_modules/.pnpm/[email protected][email protected]_@[email protected][email protected][email protected][email protected]_/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):

  • OS: macOS

AmruthPillai avatar May 18 '24 18:05 AmruthPillai