1

I'm following along in a Tuts+ tutorial on Angular. In this video: https://code.tutsplus.com/courses/whats-new-in-angular-2/lessons/angular-2-and-es5 the author says to type the following command:

npm install angular2 --save

I tried that, as well as using sudo in front of it as well, but get the following errors:

npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm ERR! Darwin 15.0.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "angular2" "--save"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: angular2@'*'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["2.0.0-alpha.8.dev","2.0.0-alpha.8.prod","2.0.0-alpha.11","2.0.0-alpha.12","2.0.0-alpha.13","2.0.0-alpha.14","2.0.0-alpha.15","2.0.0-alpha.16","2.0.0-alpha.17","2.0.0-alpha.18","2.0.0-alpha.19","2.0.0-alpha.20","2.0.0-alpha.21","2.0.0-alpha.22","2.0.0-alpha.23","2.0.0-alpha.24","2.0.0-alpha.25","2.0.0-alpha.26","2.0.0-alpha.27","2.0.0-alpha.28","2.0.0-alpha.29","2.0.0-alpha.30","2.0.0-alpha.31","2.0.0-alpha.32","2.0.0-alpha.33","2.0.0-alpha.34","2.0.0-alpha.35","2.0.0-alpha.36","2.0.0-alpha.37","2.0.0-alpha.38","2.0.0-alpha.39","2.0.0-alpha.40","2.0.0-alpha.41","2.0.0-alpha.42","2.0.0-alpha.44","2.0.0-alpha.45","2.0.0-alpha.46","2.0.0-alpha.47","2.0.0-alpha.48","2.0.0-alpha.49","2.0.0-alpha.50","2.0.0-alpha.51","2.0.0-alpha.52","2.0.0-alpha.53","2.0.0-alpha.54","2.0.0-alpha.55","2.0.0-beta.0","2.0.0-beta.1"]
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

enter image description here

thoughts?

The author is able to do it fine without errors:

enter image description here

2
  • 2
    You can do npm install angular2@SPECIFIC_VERSION where SPECIFIC_VERSION is one of the shown in the error, or use npm install angular2@latest --save Commented Jan 11, 2016 at 16:55
  • Ah thanks! That was it :D @latest want to post your answer? Commented Jan 11, 2016 at 16:55

1 Answer 1

4

To install angular2 using npm you can either specify the version or use @latest

  • Specifying a version
npm install [email protected] --save
  • Using latest (this will obviously install the latest version available in npm)
npm install angular2@latest --save

Note as well that there are plans to support angular@next that would add the posibility to install nightly builds, but it's not yet supported (so far snapshots are released from time to time, but the command is not yet available). Check issue #4671 for more info.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.