Help upgrading packages - @keystatic/core from 0.2.12 to 0.3.0 & @keystatic/next from 2.0.1 to 3.0.0 #932
-
Upgrading just core from 0.2.12 to 0.3.0 gives the following error Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ..Failed to compile.
./keystatic.config.tsx:1:55
Type error: Cannot find module '@keystatic/core' or its corresponding type declarations.
> 1 | import { collection, config, fields, singleton } from "@keystatic/core"
| ^
2 |
3 | export default config({
4 | storage: {
ELIFECYCLE Command failed with exit code 1. And upgrading just next from 2.0.1 to 3.0.0 Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ...Failed to compile.
./src/app/(keystatic)/keystatic/keystatic.tsx:3:26
Type error: Cannot find module '@keystatic/next/ui/app' or its corresponding type declarations.
1 | "use client"
2 |
> 3 | import { makePage } from "@keystatic/next/ui/app"
| ^
4 | import config from "@/../keystatic.config"
5 |
6 | export default makePage(config)
ELIFECYCLE Command failed with exit code 1. I checked the changelog. Both upgrades have 'Switch build to ESM-only'. I'm unsure exactly what that means but I'm guessing I need to change the import somehow? |
Beta Was this translation helpful? Give feedback.
Answered by
emmatown
Feb 4, 2024
Replies: 2 comments 1 reply
-
You need to change |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
emmatown
-
Also for Astro, I kinda needed to add this for my config to have intellisense. "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.astro", "keystatic.config.ts"] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to change
moduleResolution
in yourtsconfig.json
tobundler