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 Angular Basics Services in Angular Locating and Installing Angular Modules

2 Answers

Neil McPartlin
Neil McPartlin
14,662 Points

Hi Mark. Using the command exactly as you wrote it, has just worked for me. I'm on Windows 7 and using the terminal that comes with Visual Studio Code.

That said, you are not alone...

https://stackoverflow.com/questions/38040479/trying-to-install-angular-2-material-from-npm-unrecognized-token-in-source-tex

... Reading this, it seems the problem can occur depending on which terminal you are using. They mention Windows Powershell being problematic and sure enough, when I tried that, it failed just like you said.

So I tried a suggested solution ...

npm install "@angular/http@2.4.2" --save --save-exact

... and this worked with Windows Powershell. So you have 2 options, try this or try a different terminal.