-
Notifications
You must be signed in to change notification settings - Fork 10
Description
$ dev
× unexpected error invalid semver range: @lts/iron
Here's the situation, we have lts/iron in .nvmrc. I tried adding .node-version and pkgx: to package.json but I still get the error. Then I tried changing .nvmrc to ^20.0.0 and I get the following error:
$ dev
× unexpected error invalid semver range: @^20.0.0
Next try gave:
$ dev
× unexpected error invalid semver range: @>20.0.0 <21.0.0
There's no mention of .nvmrc in the dev docs. Also, the error message that this is an invalid semver range is a little misleading (I think). It seems that it only accepts exact versions rather than ranges. Or maybe I misunderstood something.
It would be great if there was a clear precedence to pkgx files. I also tried adding pkgx.yml but that generates errors if both .nvmrc and pkgx.yml don't have the same version.
Edit: It seems like a bug that pkgx parses .nvmrc looking for a semver range, given that nvm itself supports other version specifiers. It seems like a separate bug that ^20.0.0 is flagged as an invalid semver range.