Summary
Turbopack production build crashes at runtime with useGridStyleProps is not a function. Building with Webpack works for me.
Error
Uncaught TypeError: (0 , p.useGridStyleProps) is not a function
at keystar-ui-layout.js:380:39
Steps
- Build with
next build (Turbopack default in Next 16)
- Run
next start and open the app (Keystatic admin page)
- The runtime crash happens
What works for me
Building with Webpack works: next build --webpack
Additional context
I noticed @keystar/ui@0.7.19's published dist file includes a self-import, which may be related to this issue:
https://cdn.jsdelivr.net/npm/@keystar/ui@0.7.19/dist/keystar-ui-layout.js
// node_modules/@keystar/ui/dist/keystar-ui-layout.js
import { useGridStyleProps as useGridStyleProps$1 } from './keystar-ui-layout.js';
// ... later in the file ...
function ScrollView(props) {
// This fails because useGridStyleProps$1 is undefined due to the self-import
let styleProps = useGridStyleProps$1(otherProps);
}
//...
export { ..., useGridStyleProps, ... };
Versions
- Next.js: 16.1.1
- React: 19.2.3
- @keystar/ui: 0.7.19
- @keystatic/core: 0.5.48
- pnpm
Question
I’m not sure if this self-import is intentional. If it isn’t, would it be possible to fix it in a future release?