nx-extensions icon indicating copy to clipboard operation
nx-extensions copied to clipboard

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

Open MiniGod opened this issue 2 years ago • 3 comments

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 avatar Feb 28 '23 10:02 MiniGod

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

MiniGod avatar Feb 28 '23 11:02 MiniGod

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

DominikPieper avatar Mar 09 '23 13:03 DominikPieper

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)

MiniGod avatar Mar 09 '23 14:03 MiniGod