Dear Prismic Community,
I am currently developing a web application using Prismic, SvelteKit, and TypeScript. While setting up a sandbox environment, I encountered an issue that I hope someone can assist me with.
Steps Taken:
- Executed the following command to create a new project directory:
npx @slicemachine/init@latest --starter sveltekit-starter-prismic-minimal
- After navigating into the project directory, I ran
npm run dev
to start the development server.
Issue Encountered:
Upon running npm run dev
, the following errors were displayed:
❯ npm run dev
> sveltekit-starter-prismic-minimal@0.0.1 dev
> concurrently "npm:vite:dev" "npm:slicemachine" --prefix-colors blue,magenta
[vite:dev]
[vite:dev] > sveltekit-starter-prismic-minimal@0.0.1 vite:dev
[vite:dev] > vite dev
[vite:dev]
[slicemachine]
[slicemachine] > sveltekit-starter-prismic-minimal@0.0.1 slicemachine
[slicemachine] > start-slicemachine
[slicemachine]
[vite:dev] Re-optimizing dependencies because lockfile has changed
[vite:dev]
[vite:dev] VITE v5.3.1 ready in 1425 ms
[vite:dev]
[vite:dev] ➜ Local: http://localhost:5173/
[vite:dev] ➜ Network: use --host to expose
[vite:dev] ✘ [ERROR] No matching export in "node_modules/@prismicio/svelte/dist/types.js" for import "TableComponents"
[vite:dev]
[vite:dev] node_modules/@prismicio/svelte/dist/PrismicTable/DefaultComponent.svelte:26:9:
[vite:dev] 26 │ import { TableComponents } from "../types";
[vite:dev] ╵ ~~~~~~~~~~~~~~~
[vite:dev]
[vite:dev] ✘ [ERROR] No matching export in "node_modules/@prismicio/svelte/dist/types.js" for import "SvelteRichTextSerializer"
[vite:dev]
[vite:dev] node_modules/@prismicio/svelte/dist/PrismicTable/PrismicTable.svelte:31:9:
[vite:dev] 31 │ import { SvelteRichTextSerializer } from "../types";
[vite:dev] ╵ ~~~~~~~~~~~~~~~~~~~~~~~~
[vite:dev]
[slicemachine]
[slicemachine] Slice Machine v2.13.1 → Running at http://localhost:9999
[slicemachine]
Observations:
- Cloning the repository from GitHub - prismicio-community/sveltekit-starter-prismic-minimal: Start a project with SvelteKit & Prismic and running
npm run dev
does not produce these errors. - A comparison of the
package.json
files between the two setups reveals differences in the version numbers of certain dependencies:
{
"dependencies": {
"@prismicio/client": "^7.16.1",
"@prismicio/svelte": "^1.4.0",
"@slicemachine/adapter-sveltekit": "^0.3.68",
"slice-machine-ui": "^2.13.1"
}
}
versus
{
"dependencies": {
"@prismicio/client": "^7.9.0",
"@prismicio/svelte": "^1.2.0",
"@slicemachine/adapter-sveltekit": "^0.3.41",
"slice-machine-ui": "^2.2.0"
}
}
Request for Assistance:
I suspect that the errors may be related to the version differences, particularly with @prismicio/svelte
.
- Has anyone encountered similar issues when using the latest versions of these packages?
- Is there a recommended approach to resolve these errors while maintaining up-to-date dependencies?
Any guidance or suggestions would be greatly appreciated.
Thank you in advance for your assistance.
Best regards,
Anno