Shields: npm dev dependency version badge not working with scoped dependencies

Created on 6 Apr 2019  路  4Comments  路  Source: badges/shields

Are you experiencing an issue with...

  • [x] [shields.io](https://shields.io/#/)
  • [ ] My own instance
  • [ ] [gh-badges NPM package](https://www.npmjs.com/package/gh-badges)

use:

/npm/dependency-version/react-boxplot/dev/@babel/core
https://img.shields.io/npm/dependency-version/react-boxplot/dev/@babel/core.svg

expected:

@babel/core ^7.0.0

result:

404 badge not found

bug service-badge

Most helpful comment

@chris48s - I still think this is a bug with npm badge. If I'm wrong or missing something please let me know though.

The npm dependency version and github package.json version badges are different and while the package.json version badge can indeed be used as workaround, I think the route pattern for the npm dependency version badges can't handle scoped dependencies due to the extra / scope deps add.

All 4 comments

The reason this isn't working is because you're missing the user/org of the repo.

I think you're trying to do this:

- https://img.shields.io/github/package-json/dependency-version/paulmelnikow/react-boxplot/dev/@babel/core.svg

The modal window in the UI still looks buggy to me, as it's missing the field for the username:

image

@chris48s - I still think this is a bug with npm badge. If I'm wrong or missing something please let me know though.

The npm dependency version and github package.json version badges are different and while the package.json version badge can indeed be used as workaround, I think the route pattern for the npm dependency version badges can't handle scoped dependencies due to the extra / scope deps add.

Oh yes. You're right - sorry. I hadn't noticed that we have 2 slightly different approaches to npm dependency-version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexWayfer picture AlexWayfer  路  40Comments

bryanveloso picture bryanveloso  路  37Comments

paulmelnikow picture paulmelnikow  路  30Comments

tony19 picture tony19  路  31Comments

bsdlp picture bsdlp  路  25Comments