Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript npm Basics Managing Packages with NPM Review

Jacob Herper
Jacob Herper
94,150 Points

Question has no correct answer (always shows "Bummer! Unfortunately, the answer is incorrect")

I believe this question in the "npm basics refresh" course is broken:

Given the following package.json npm could theoretically install which of the following versions of express.

The correct answer should be 4.5.0, but I have tried all three options and cannot pass this quiz for that reason.

3 Answers

Torben Korb
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Torben Korb
Front End Web Development Techdegree Graduate 91,433 Points

Dear Jacob,

updated answer:

You are absolutely right, Jacob. To pass this test you need to select both values: "4.5.0" and "5.0.0". This let's you pass the quiz but is incorrect. Semver caret ranges DO NOT include 5.0.0 version with the given example. I reported this quiz to the Treehouse team.

Hope this helps, happy coding! :D


Original answer: the right answer to pass the quiz is 4.5.0 AND 5.0.0. It's a multiple answers question. The label is "Choose all that apply".

See explanation of node semver caret ranges (hint: it's about compatibility): https://github.com/npm/node-semver#caret-ranges-123-025-004

Jacob Herper
Jacob Herper
94,150 Points

This must have been updated, yesterday when I tried it, it would not let me select multiple options!

Torben Korb
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Torben Korb
Front End Web Development Techdegree Graduate 91,433 Points

Alex Hort-Francis , you're absolutely right and it seems the quiz answer is incorrect. The 5.0.0 version should not be included but the quiz only let's you pass with that (false) answer. Probably the value for the second selectable answer should be "<5.0.0". I'll update my initial answer here for clarification. Also I reported the quiz right now to Treehouse. Thanks for opening up again to clarify and happy coding!

Alex Hort-Francis
Alex Hort-Francis
17,074 Points

The day when I correctly recognise an incorrect question on Treehouse, this is a proud moment! :D

Alex Hort-Francis
Alex Hort-Francis
17,074 Points

I don't think 5.0.0 is correct.

^4.0.0 should not include incrementing the major version.

Can anyone confirm, or am I getting the wrong end of the stick?