Closed oskar-gmerek closed 10 months ago
Additional info:
Long time ago I noticed that is some kind of mismatch with the masterCSS npm packages versions. I have installed an extension in VS Code for checking outdated dependencies. This extensions checking every dependency, one by one when triggered. There is also an option to detect latest prereleases.
I using this extension intensively from long time (like two years or even longer) and honestly I didn't catch any version mismatches with any libraries other than masterCSS. For masterCSS I often getting info that the latest prerelease is a older version than is it.
For example, currently I have installed:
"@master/css": "2.0.0-beta.186",
"@master/css.svelte": "2.0.0-beta.186",
"@master/normal.css": "2.0.0-beta.186",
And I getting info from this extension than latest available prereleases are:
2.0.0-beta.186
for @master/css
,2.0.0-beta.131
for @master/css.svelte
,2.0.0-beta.84
for @master/normal.css
After writing everything above, I went to npm to double check and I see why is that. The beta versions are beta.186 for all of that packages, but css.svelte and normal.css have latest versions suggested by the extension. beta version > latest version what is making version mismatch.
When I started to write this additional info I was thinking that can be related to original report, but now I'm not sure. Any way, latest version should be updated on releasing beta's of css.svelte and normal.css packages before get to v1.
If someone will stuck with this problem, then the temporary workaround is a follow:
Add this to your main package.json:
...
"overrides": {
"@master/css": "2.0.0-beta.186",
"@master/css.svelte": "2.0.0-beta.186",
"@master/normal.css": "2.0.0-beta.186",
"@master/keyframes.css": "2.0.0-beta.186"
},
...
@oskar-gmerek Thanks for describing the problem clearly!
This is a transition period, some packages are added during the Beta period, and usually version releases are only marked as stable versions (latest). If you don't suffix @beta
like npm i @master/css@beta
, it won't install the actual latest version, which is normal behavior.
At this stage your solution is correct. Individually specify installation into package.json dependencies.
Description
I set up a new SvelteKit project. While integrating with masterCSS, I started to encounter errors:
I started by deleting the .svelte-kit generated files, node-modules, and package manager lock files. I reinstalled and restarted, but it didn't help.
Next, I dived into the source code to find the cause.
I noticed that the library @master/css.svelte doesn't use the version of @master/css that I installed but installed its own version.
When I go to /node-modules/@master/css.svelte/node-modules/@master/css/package.json, I can see:
I don't quite understand how 'beta.99' appears there, but I have no illusions; it is certainly the cause of the above errors.
Reproduction
Just follow docs for svelte integration using bun as a package manager.
System Informations
Browser: N/A OS: macOS Sonoma 14.1 Node.js: 18.16.1 Package Manager: bun 1.0.7