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.

528516 (3) [Avatar] Offline
#1
Any thoughts on the below?


Angular CLI: 6.1.0
Node: 8.11.3
OS: linux x64
Angular:
...

Package Version
------------------------------------------------------
@angular-devkit/architect 0.7.0
@angular-devkit/core 0.7.0
@angular-devkit/schematics 0.7.0
@schematics/angular 0.7.0
@schematics/update 0.7.0
rxjs 6.2.2
typescript 2.7.2


ng serve
Your global Angular CLI version (6.1.0) is greater than your local
version (1.6.8). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Cannot read property 'write' of undefined
TypeError: Cannot read property 'write' of undefined
    at UI.write (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/ember-cli/lib/ui/index.js:56:23)
    at UI.writeLine (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/ember-cli/lib/ui/index.js:69:8)
    at Class.run (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/tasks/serve.js:229:12)
    at check_port_1.checkPort.then.port (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/commands/serve.js:123:26)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Jesse Palmer (53) [Avatar] Offline
#2
528516 wrote:Any thoughts on the below?


Angular CLI: 6.1.0
Node: 8.11.3
OS: linux x64
Angular:
...

Package Version
------------------------------------------------------
@angular-devkit/architect 0.7.0
@angular-devkit/core 0.7.0
@angular-devkit/schematics 0.7.0
@schematics/angular 0.7.0
@schematics/update 0.7.0
rxjs 6.2.2
typescript 2.7.2


ng serve
Your global Angular CLI version (6.1.0) is greater than your local
version (1.6.8). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Cannot read property 'write' of undefined
TypeError: Cannot read property 'write' of undefined
    at UI.write (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/ember-cli/lib/ui/index.js:56:23)
    at UI.writeLine (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/ember-cli/lib/ui/index.js:69:8)
    at Class.run (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/tasks/serve.js:229:12)
    at check_port_1.checkPort.then.port (/home/ryan/workspace/angular-testing/testing-angular-applications/website/node_modules/@angular/cli/commands/serve.js:123:26)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)


Right now the project doesn't support that version of the CLI. Looks like there was a breaking change at some point. Try running:

npm i -g @angular/cli@1.6.8

That should work. The Appendix will be updated to reflect this.

528516 (3) [Avatar] Offline
#3
Cheers, I'll have a crack at that when I'm at my dev machine and see what happens smilie
Craig Nishina (4) [Avatar] Offline
#4
I am assuming you are looking at the website directory. Since your global and local Angular-cli node modules are different, you could run the ones specified in the repo with "npm run ng". So if you needed to run "ng serve", you would run "npm run ng serve". We also added a shortcut in package.json "scripts", where you could just run "npm start" which shortcuts to the local node modules "ng serve".