deeleman / learning-angular2

Code samples repository for the examples provided in "Learning Angular 2", published by Packt Publishing - THE BOOK COVERS UP TO RC.1 and hence is severely OUTDATED. PLEASE REFER TO THE LATEST EDITIONS INSTEAD.
https://www.packtpub.com/web-development/learning-angular-2
108 stars 59 forks source link

problem with bash command and chapter 1 code #48

Closed kcp200607 closed 7 years ago

kcp200607 commented 7 years ago

When I tried to install packages with bash command (page 7), I had "Sorry, name can only contain URL-friendly characters." error message(see screenshot below)

When I tried to install packagers for chapter 1 code (run "npm install"). It failed to install packages (see attachment for error log) npm-debug.zip

Please advise

C:>cd LAngular2

C:\LAngular2>npm init This utility will walk you through creating a package.json file. It only covers the most common items, and tries to guess sensible defaults.

See npm help json for definitive documentation on these fields and exactly what they do.

Use npm install <pkg> --save afterwards to install a package and save it as a dependency in the package.json file.

Press ^C at any time to quit. name: (LAngular2) npm install @angular/common --save Sorry, name can only contain URL-friendly characters. name: (LAngular2)

deeleman commented 7 years ago

By the looks of your log file you're deploying the examples on a Windows machine. Please remove the preinstall command from package.json and everything will work just fine.

BTW, I'm afraid this is only the beginning of an inmense pile of issues you'll be encountering as you pave your way along the book. This book is unfortunately too outdated now and its contents do not stay relevant any longer.

Please refer to the original documentation for a more up to date guidance on installing and deploying Angular 2 apps. I'm sorry I cannot be in more help ATM.