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

Sample code is already obsolete!! #2

Open
jroughgarden opened this issue Sep 15, 2018 · 2 comments
Open

Sample code is already obsolete!! #2

jroughgarden opened this issue Sep 15, 2018 · 2 comments

Comments

@jroughgarden
Copy link

jroughgarden commented Sep 15, 2018

I am an experienced .Net developer and was taking a Udemy course in AngularJS when I realized that it was obsolete. So I got this book to re-start with the latest Angular. But now I find that this book's code, published only THREE months ago, is already obsolete. I can't even get 'ng serve' to work because my downloaded Angular/CLI version (6.2.1) requires an angular.json file rather than the deprecated .angular-cli.json file. When I Google the issue, I'm told to run the 'ng update @angular/cli --migrate-only --from=1.7.3' command to replace the old file (3 months old) with the new file. But it does not work!!
Mr. Sheshadri, you really need to update all your code and make it available on git. As it is this book is worthless to a novice Angular learner. When I download and install Node.js, typescript, and Angular/CLI as instructed, and then download your codebase from GIT, nothing works. Sorry, but the truth hurts.

@newschapmj1
Copy link

I agree a new release of these exercises is needed for Angular 6.
I had Angular 6 already installed before I attempted to run the exercise solutions from github.

After several attempts this worked for me on Exercise 3, 4 & 5.
I'm an Angular newbie so I may be doing it in a sub-optimal way.

Upgrade steps
ng update
We analyzed your package.json, there are some packages to update:

  Name                               Version                  Command to update
 --------------------------------------------------------------------------------
  @angular/cli                       1.7.4 -> 6.2.3           ng update @angular/cli
  @angular/core                      5.2.11 -> 6.1.9          ng update @angular/core
  rxjs                               5.5.12 -> 6.3.3          ng update rxjs


There might be additional packages that are outdated.
Or run ng update --all to try to update all at the same time.

=========================

--to prevent rxjs errors
npm install --save rxjs-compat

ng update @angular/cli
ng update @angular/core
ng update rxjs
ng update --still no angular.json created

--now creates a angular.json file and updates other .json files
ng update @angular/cli --migrate-only --from=1.7.4

--with the angular.json file ng serve now works
ng serve

=====================
Environment
I was using Windows 10
ng -v

Angular CLI: 6.2.3
Node: 8.9.4
OS: win32 x64
Angular: 6.1.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.8.3
@angular-devkit/build-angular 0.8.3
@angular-devkit/build-optimizer 0.8.3
@angular-devkit/build-webpack 0.8.3
@angular-devkit/core 0.8.3
@angular-devkit/schematics 0.8.3
@angular/cli 6.2.3
@ngtools/webpack 6.2.3
@schematics/angular 0.8.3
@schematics/update 0.8.3
rxjs 6.3.3
typescript 2.9.2
webpack 4.20.2

@okeyokoro
Copy link

perhaps try running ng update @angular/cli @angular/core

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

No branches or pull requests

3 participants