nodist: Error: Couldn't resolve version spec %s: %s

First of all, thank you very much for very useful application!

Now I got an error in nodeist@0.8.2 in Windows 8.1. I have installed node with version 4.4.7 with nodist.

When I command node in the directory, then I got an error Sorry, there's a problem with nodist. Couldn't resolve version spec %s: %s >=4.0.0 <7.0.0 improper constraint: >=4.0.0 <7.0.0.

The directory have package.json file which includes key "engines": {"node": ">=4.0.0 <7.0.0"}, it might make problem. When I removed the line "engines": {"node": ">=4.0.0 <7.0.0"}, then the command node works well.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Mh. That’s a bug in the semver lib for the shims.

As an intermediate fix you can override local switching with env switching: you can set the desired version using nodist env x.x.x

On July 14, 2016 11:25:39 AM CEST, Jack Cuthbert notifications@github.com wrote:

Colleagues of mine also having the same issue on Windows 10. Removing <7 solved it for them: "engines": {"node": ">=4"} should work until this is resolved.


You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/marcelklehr/nodist/issues/155#issuecomment-232613714

Sent from my Android device with K-9 Mail. Please excuse my brevity.

Deleted .node-version file, problem gone.

Current progress on this issue: I’ve fixed the underlying library https://github.com/marcelklehr/semver and will release a new version soon.

Not sure if it’s directly connected to this, but here goes: Tried to install typescript and then execute tsc -v (or anything else starting with tsc and I get only this: Sorry, there's a problem with nodist. Couldn't resolve version spec %s: %s --help Unexpected character in constraint --help: --help

I’ve just released v0.8.3, which has the fix for this.