nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
465 stars 102 forks source link

Sveltekit: Unable to install: "not a valid SemVer 2.0.0 version" #906

Open MiniGod opened 1 year ago

MiniGod commented 1 year ago

Describe the bug

When installing @nxext/sveltekit via azure, I get an the following error:

npm ERR! 400 Bad Request - GET https://pkgs.dev.azure.com/[...]/npm/registry/@nxext/sveltekit/-/sveltekit-11.0.0-next.1.tgz - The package version '11.0.0-next.01' is not a valid SemVer 2.0.0 version

To Reproduce

  1. Configure npm to use an azure registry
  2. npm i -D @nxext/sveltekit (all the published versions fail, 11, 12, 13, 14).

Expected behavior

The installation should not fail.

Additional context

Appears to have been fixed here, but not published: https://github.com/nxext/nx-extensions/commit/f24b15012e124a11cb039d76a8a8f7664e316349

MiniGod commented 1 year ago

I didn't realize it at the time of creating the issue, but a workaround is to use the official npm registry with --registry https://registry.npmjs.org

DominikPieper commented 1 year ago

I never used azure. Sounds like an problem with their setup?

MiniGod commented 1 year ago

I guess you could argue that, but the package.json that is published on registry.npmjs.org does still include the invalid version number.

The difference seems to be that azure seems to error on their server-side while parsing the package file when fetched, while npmjs.org repo does not error (probably just serving the file statically without parsing).

Since the version is invalid, I'd guess other tools will also fail when parsing the package. Is this not happening with other proxies to npmjs.org / mirrors that use npmjs.com as an upstream repo? (not expecting an answer from you. just throwing it out)