1

When I run my project by ng serve I see this error in command prompt

Cannot read property 'write' of undefined
TypeError: Cannot read property 'write' of undefined
    at UI.write (C:\Source\Front\node_modules\@angular\cli\ember-cli\lib\ui\index.js:56:23)
    at UI.writeLine (C:\Source\Front\node_modules\@angular\cli\ember-cli\lib\ui\index.js:69:8)
    at Class.run (C:\Source\Front\node_modules\@angular\cli\tasks\serve.js:237:12)
    at check_port_1.checkPort.then.port (C:\Source\Front\node_modules\@angular\cli\commands\serve.js:123:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Since the update Angular CLI to the last version 6.1.1, this problem has arisen
How can I solve this problem?

Package version:

Angular CLI: 6.1.1
Node: 10.7.0
OS: win32 x64
Angular:
...

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

3 Answers 3

2

related with angular-cli latest release - 6.1.0 and 6.1.1.downgrade angular-cli to 6.0.8 and it works fine.

Sign up to request clarification or add additional context in comments.

4 Comments

I'd like to use Angular CLI: 6.1.1 because of another project in my system use Angular CLI: 6.1.1
angular-cli active issue for 2 days ago it will be fine in new version but now there is problem with 6.1.1
How can I install version 6.0.8 ?
npm uninstall -g @angular-cli / npm cache clean --force / npm install -g @[email protected]
1

I can't reproduce your issue. You still have an old ember-cli folder in your error logs. This folder is not part of the AngularCLI anymore. So to update your project:

First update all of the global dependencies of your system:

npm update -g

Then update your local dependencies this way:

rmdir /S /Q node_modules
npm install --save-dev @angular/cli@latest
ng update --all
npm install

It will remove your old node_modules folder first and then it will reinstall it properly and cleanly.

Comments

1

I was have the same problem and I found the solution at github issue related to the same problem

npm install --save-dev @angular/[email protected]
ng update @angular/cli --migrate-only --from=1.7.4

Web cannot run after update angular cli to 6.1.0 #11661

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.