Really need a way to specify dependency version

It would be really really helpful to be able to specify package version number. Quiet often, I get an outdated version of package. Sometimes I want to try a previous version of one of my packages and I can’t at all.

Love your service, but please give me way to specify which version of a package I want to use.

Hi there!

You can specify the version number of a package manually by appending @1.0.0 (or other valid semver) to the require.
e.g:
require("lodash@1.0.0");

1 Like

I was hoping this would work, but it doesn’t seem to. I published this package today.

Sorry about the delay. You package is now available.

Unfortunately your package got stuck in our queue and was unable to process. We pushed it along for you. Generally this shouldn’t happy very often, but it does happen :frowning:

To provide a little more context for you, all packages on RunKit are installed by default. So when you require them it’s already there without having to have us run npm install on the fly. RunKit will always default to the package version with the largest semver, as long as it has been processed.

One day we’d like to make a nice UI to allow users to select any version of the package we have installed, but that will be a bit in the future!

Thanks, and sorry for the inconvenience.

  • Randy

Thank you for your help :slight_smile:

Apparently I can’t type today! Fixed some typos in the above post. Your package is NOW available.
Sorry about that! Happy to help!
– Randy

Actually, it would be super epic if it was possible to specify an SHA to use a version from github. This would allow me to show running code in a PR that is not released yet.

Something like this would be amazing: const microstates = require('github:microstates/microstates.js#SHA')

Any chance you could make this possible?