vsavkin/router_mailapp

Still: The "@angular/compiler-cli" package was not properly installed.

Opened this issue · 4 comments

Still: The "@angular/compiler-cli" package was not properly installed; After doing the recommended trick:

npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest

I still get the error below when attempting to do:

$ ng serve
The "@angular/compiler-cli" package was not properly installed.
Error: The "@angular/compiler-cli" package was not properly installed.
    at Object.<anonymous> (/opt/dev/router_mailapp/node_modules/@ngtools/webpack/src/index.js:14:11)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/dev/router_mailapp/node_modules/@angular/cli/tasks/eject.js:10:19)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

Attempted to put in some stars to no avail:

$ cat package.json
{
  "name": "booknew",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "*",
    "@angular/compiler": "*",
    "@angular/core": "*",
    "@angular/forms": "*",
    "@angular/http": "*",
    "@angular/platform-browser": "*",
    "@angular/platform-browser-dynamic": "*",
    "@angular/router": "*",
    "@angular/material": "*",
    "@types/hammerjs": "^2.0.32",
    "core-js": "^2.4.1",
    "hammerjs": "^2.0.8",
    "rxjs": "5.0.1",
    "ts-helpers": "^1.1.1",
    "zone.js": "*"
  },
  "devDependencies": {
    "@angular/cli": "*",
    "@types/jasmine": "^2.2.30",
    "codelyzer": "~0.0.26",
    "jasmine-core": "2.4.1",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "4.0.5",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "2.0.2",
    "webpack": "*"
  }
}
$ ng serve
The "@angular/compiler-cli" package was not properly installed.
Error: The "@angular/compiler-cli" package was not properly installed.
    at Object.<anonymous> (/opt/dev/router_mailapp/node_modules/@ngtools/webpack/src/index.js:14:11)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/dev/router_mailapp/node_modules/@angular/cli/tasks/eject.js:10:19)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

AngularRouter.txt

Sorry for the long text, that's what i'm doing to fix the error. but in the end when browser launch, i get this error in console of browser:

Error: Template parse errors:
'md-input' is not a known element:

  1. If 'md-input' is an Angular component, then verify that it is part of this module.
  2. If 'md-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("<form [formGroup]="form" (ngSubmit)="onSubmit()">
Title: [ERROR ->]

just edit file router_mailapp/src/app/conversations/compose like below:

Title: <md-input-container formControlName="title" required></md-input-container>

that's will work.

You can also run it using the actual cli installed locally with the project: node_modules/.bin/ng serve, it work then.