The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

225156 (1) [Avatar] Offline
#1
Hello,

I am new to Angular. I cannot get the sample project to build:

it says:
$ npm install
npm WARN deprecated @angular/cdk@5.0.0-rc0: Use 5.0.0-rc.0 instead
npm WARN deprecated @angular/material@5.0.0-rc0: Use 5.0.0-rc.0 instead


If I fix this in package.json, then I get an error
ERROR in Error: No NgModule metadata found for 'AppModule'.


Something wrong with my node/angular installation?
running ng -v:

$ ng -v

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / ? \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.5.0
Node: 8.1.4
OS: darwin x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cdk: 5.0.0-rc.0
@angular/cli: 1.5.0
@angular/material: 5.0.0-rc.0
@ngtools/json-schema: 1.1.0
typescript: 2.4.2
webpack: 3.10.0
$


Regards - Stefan.
Jesse Palmer (53) [Avatar] Offline
#2
Hi Stefan,

Try running putting the package.json file back to the original state and then run `rm -rf node_modules` and then run `npm i` again in the `website` directory. I tried to replicate the error but was unsuccessful.

One question, when you get those warning messages before did the app still run?

Jesse
Jesse Palmer (53) [Avatar] Offline
#3
I saw the errors you mentioned. I upgraded the packages and it seems to work ok now. Do a `git pull` to get the latest files and then do an `npm i` inside the `website` directory. Let me know if you have any other issues. Thank you!