Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Proget not listing npm tags
-
Hi. We recently begun using Proget and discovered that npm tag queries were not yielding any results for our packages.
https://docs.npmjs.com/cli/v9/commands/npm-dist-tag
npm ls dist-tags [package-name]
Our original assumption was that PG-2396 would result in this fix but an upgrade to 2023.10 did not help. Modifying a package's tags from the UI would seemingly succeed, but a reload of the "Edit Tags" modal will result in an empty screen. npm add dist-tags [package@version] [tag] would result in the following npm error
npm ERR! No dist-tags found for [packageName]
I eventually tracked the issue down to the dbo.Npm_GetPackageTags stored procedure. This procedure is querying the NpmFeedPackageTags_Extended table. When I changed it to NpmFeedPackageTags, tags began listing correctly both in the UI as well as using the npm ls command.
Hopefully that was the correct approach.
-
Hi @falam_3608,
Thanks for letting us know what you found. I'm looking at that query now and I think i see the issue. But to confirm, is this error happening for all packages or just packages with a scope (e.g. @myscope/pacakage)?
Thanks,
Rich
-
Hi @falam_3608,
Can you please run the following SQL query on your ProGet database and let me know if that fixes your issue? This will update the
NpmFeedPackageTags_Extended
view to fix a problem with tags and scoped packages.IF OBJECT_ID('[NpmFeedPackageTags_Extended]') IS NOT NULL DROP VIEW [NpmFeedPackageTags_Extended] GO CREATE VIEW [NpmFeedPackageTags_Extended] AS SELECT NFPT.*, PNI.[PackageGroup_Name], PNI.[Package_Name] FROM [NpmFeedPackageTags] NFPT INNER JOIN [PackageNameIds] PNI ON PNI.[PackageName_Id] = NFPT.[PackageName_Id] AND PNI.[PackageType_Name] = 'npm' GO
Thanks,
Rich
-
Thank you @rhessinger! The updated view works for both scoped and non-scoped packages.
-
Hi @falam_3608,
That's great to hear. The will also be released in ProGet 2023.11. You will not need to roll anything back upon the next upgrade, InedoHub handles these automatically.
Thanks,
Rich