geist-font
geist-font copied to clipboard
RollupError when using Geist with Remix (Vite)
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:
- Setup a new Remix project
- Install Geist
- Use Geist
Environment (please complete the following information):
- OS: macOS