Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version checking issue with "00 Install npm" exercise #115

Open
mark-walle opened this issue Mar 22, 2017 · 3 comments
Open

Version checking issue with "00 Install npm" exercise #115

mark-walle opened this issue Mar 22, 2017 · 3 comments
Labels

Comments

@mark-walle
Copy link

Encountered a mistake with the first exercise where it believes an older version of npm is later than my current version:

> how-to-npm verify
verifying that npm is installed...
You have version 4.1.2 installed.  Great!
Now let's see what the latest version is... wait for it...
The latest npm is: 4.4.1
You have version 4.1.2, but the latest is 4.4.1
Run `npm install npm -g` to upgrade it
(You can also just skip this if you want)
@mark-walle
Copy link
Author

I just changed to 4.4.1 in order to complete the workshop, but maybe how-to-npm should allow pre-releases to pass, or give explicit directions to not use pre-release versions.

@watilde watilde added the bug label Mar 30, 2017
@watilde
Copy link
Member

watilde commented Mar 30, 2017

thanks for reporting this! I think it's just a logic bug in a code:
https://github.com/workshopper/how-to-npm/blob/master/problems/00-install-npm/index.js#L53

I'm gonna fix it.

@myintmyatkyu
Copy link

myintmyatkyu commented May 17, 2018

Hi I got this error when I run how-to-npm verify at "00 install npm" exercise
I have passed all other exercises except this one. Thanks

how-to-npm verify
verifying that npm is installed...
You have version 6.0.1 installed. Great!
Now let's see what the latest version is... wait for it...
The latest npm is:
/home/ec2-user/.nvm/versions/node/v6.14.1/lib/node_modules/how-to-npm/node_modules/semver/semver.js:295
throw new TypeError('Invalid Version: ' + version);
^

TypeError: Invalid Version:
at new SemVer (/home/ec2-user/.nvm/versions/node/v6.14.1/lib/node_modules/how-to-npm/node_modules/semver/semver.js:295:11)
at compare (/home/ec2-user/.nvm/versions/node/v6.14.1/lib/node_modules/how-to-npm/node_modules/semver/semver.js:571:10)
at Function.gt (/home/ec2-user/.nvm/versions/node/v6.14.1/lib/node_modules/how-to-npm/node_modules/semver/semver.js:600:10)
at /home/ec2-user/.nvm/versions/node/v6.14.1/lib/node_modules/how-to-npm/problems/00-install-npm/index.js:53:18
at ChildProcess.exithandler (child_process.js:190:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants