You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
svelte-package and PNPM workspace Catalogs: Invalid comparator: catalog: #12521
I ended up solving the issue: not sure why but it was essentially using "svelte": "catalog:" in peerDependencies doesn't work.
It is only svelte in peerDependencies that causes the issue. I have to actually have an actual value in peerDependencies: "svelte": "5.0.0-next.260". Although any other package in peerDependencies with catalog: works...
Deleted node_modules and did pnpm store prune and its only the svelte package.
Based on pnpm docs apparently you can't use catalog: in peerDependencies...but its work for other packages.
Only these are ok based on docs
dependencies
devDependencies
optionalDependencies
pnpm.overrides
Activity
arkmech commentedon Jul 30, 2024
Relevant?: #12120
Not sure how to use override feature.
arkmech commentedon Aug 16, 2024
Any update?
arkmech commentedon Sep 28, 2024
Ok, had time to do more digging: The issue is coming from
semverwhich@sveltejs/packageuses.arkmech commentedon Sep 28, 2024
pnpm-workspace.yamlIts specifically
catalog:that doesn't work. butcatalog:sveltetoolingworks.package.json{ "name": "@company/ui", "version": "0.0.1", "private": true, "type": "module", "exports": { }, "files": [ "dist", "!dist/**/*.test.*", "!dist/**/*.spec.*" ], "scripts": { "dev": "vite dev --open", "build": "vite build && pnpm package", "clean": "rm -rf .turbo dist node_modules", "preview": "vite preview", "package": "svelte-kit sync && svelte-package && publint", "prepublishOnly": "npm run package", "format": "prettier --check . --ignore-path ../../.gitignore", "lint": "eslint", "test": "npm run test:integration && npm run test:unit", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test:integration": "playwright test", "test:unit": "vitest", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" }, "dependencies": { }, "devDependencies": { "@sveltejs/kit": "catalog:", "@sveltejs/package": "catalog:sveltetooling" }, }arkmech commentedon Sep 29, 2024
I ended up solving the issue: not sure why but it was essentially using "svelte": "catalog:" in
peerDependenciesdoesn't work.It is only
svelteinpeerDependenciesthat causes the issue. I have to actually have an actual value inpeerDependencies: "svelte": "5.0.0-next.260". Although any other package inpeerDependencieswithcatalog:works...Deleted
node_modulesand didpnpm store pruneand its only thesveltepackage.Based on pnpm docs apparently you can't use
catalog:in peerDependencies...but its work for other packages.Only these are ok based on docs
dependencies
devDependencies
optionalDependencies
pnpm.overrides
JamesHallowell commentedon Feb 2, 2025
It does appear that you can now use
catalog:forpeerDependencies:Is this something that
svelte-packagecould support? It looks as though this is the part that doesn't work at the moment:kit/packages/package/src/typescript.js
Lines 30 to 31 in 09296d0
I guess in the case of a
catalog:dependency it would need to go and resolve the svelte version from thepnpm-workspace.ymlfile.schmittl commentedon Jun 24, 2025
Seems like this could be fixed by #13850 already?