Farata / angular2typescript

Code samples from the book Angular 2 Development with TypeScript
MIT License
440 stars 270 forks source link

I have a lot of errors when running the example: "angular2typescript/Angular4/router-samples/" #33

Closed j-Cis closed 6 years ago

j-Cis commented 6 years ago

I read an article about "multi-root" (https://yakovfain.com/2017/04/06/angular-cli-multiple-apps-in-the-same-project/) and there I found a link to this repo, like an example of such a solution. Unfortunately, however, during the compilation or launch, a bug a lot of pops up.

C:\2018\66\TUTORIALE\angular2typescript\Angular4\router-samples [master ≡ +4 ~1 -0 !]
λ  npm run-script buildAll

> hello-ng4@0.0.0 buildAll C:\2018\66\TUTORIALE\angular2typescript\Angular4\router-samples
> ng build --app main && ng build --app queryparams && ng build --app child && ng build --app guards && ng build --app outlets && ng build --app lazy && ng build --app resolver

Date: 2018-02-02T09:46:16.244Z
Hash: c6843fa7a8b41c8c1b66
Time: 19107ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 14.3 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 218 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 11.4 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.33 MB [initial] [rendered]

ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal-directives.d.ts (50,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (50,39): ',' expected.
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (92,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (95,46): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/dom-portal-outlet.d.ts (31,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal-directives.d.ts (14,40): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (50,41): Type parameter name cannot be 'any'
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/overlay/typings/overlay-ref.d.ts (40,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/dialog/typings/dialog-container.d.ts (55,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/tabs/typings/tab.d.ts (27,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/tabs/typings/tab-body.d.ts (44,15): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/src/app/resolver_events/app.module.ts (13,10): Module '"C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/material"' has no exported member 'MdProgressBarModule'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-ng4@0.0.0 buildAll: `ng build --app main && ng build --app queryparams && ng build --app child && ng build --app guards && ng build --app outlets && ng build --app lazy && ng build --app resolver`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-ng4@0.0.0 buildAll script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\CISOW\AppData\Roaming\npm-cache\_logs\2018-02-02T09_46_16_349Z-debug.log
C:\2018\66\TUTORIALE\angular2typescript\Angular4\router-samples [master ≡ +4 ~1 -0 !]
λ  ng s --port=7893
Your global Angular CLI version (1.7.0-beta.3) is greater than your local
version (1.6.7). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
** NG Live Development Server is listening on localhost:7893, open your browser on http://localhost:7893/ **
Date: 2018-02-02T09:47:22.673Z
Hash: 3f5058b17bd5577560fc
Time: 15196ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 28.8 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 613 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 34.2 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 7.06 MB [initial] [rendered]

ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal-directives.d.ts (50,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (50,39): ',' expected.
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (92,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (95,46): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/dom-portal-outlet.d.ts (31,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal-directives.d.ts (14,40): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/portal/typings/portal.d.ts (50,41): Type parameter name cannot be 'any'
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/cdk/overlay/typings/overlay-ref.d.ts (40,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/dialog/typings/dialog-container.d.ts (55,37): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/tabs/typings/tab.d.ts (27,23): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/tabs/typings/tab-body.d.ts (44,15): Generic type 'TemplatePortal<C, any>' requires 2 type argument(s).
ERROR in C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/src/app/resolver_events/app.module.ts (13,10): Module '"C:/2018/66/TUTORIALE/angular2typescript/Angular4/router-samples/node_modules/@angular/material/material"' has no exported member 'MdProgressBarModule'.

webpack: Failed to compile.

## How to remedy this (fix my bug)?

yfain commented 6 years ago

Neither in the article nor in the book I wrote that you should write a script to build all of them at once. Besides, it seems that you didn't run npm install.

This is a question from StackOverflow, and not an issue with the code.