angular-cli: Web cannot run after update angular cli to 6.1.0
Web cannot run after update angular cli to 6.1.0
Command (mark with an x
)
--update angular cli---
npm i -g npm
npm install -g typescript
npm install -g @angular/cli
npm install
---run application---
ng serve --open
Versions
node v8.11.2 npm v6.2.0 ng version
Angular CLI: 6.1.0 Node: 8.11.2 OS: win32 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
The log given by the failure
Cannot read property ‘write’ of undefined TypeError: Cannot read property ‘write’ of undefined at UI.write (viewer\node_modules@angular\cli\ember-cli\lib\ui\index.js:56:23) at UI.writeLine (viewer\node_modules@angular\cli\ember-cli\lib\ui\index.js:69:8) at Class.run (viewer\node_modules@angular\cli\tasks\serve.js:237:12) at check_port_1.checkPort.then.port (viewer\node_modules@angular\cli\commands\serve.js:123:26) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 4
- Comments: 18 (1 by maintainers)
It’s certainly related to angular-cli latest release - 6.1.0 and 6.1.1 yesterday.
My workaround was downgraded angular-cli to 6.0.8.
so do we. same error!
@dejobo @yeah007 I have downgraded ng CLI to 6.0.8 and it works for me.
@azulay7 I updated my previous comment. I failed to mention, because I didn’t realize it was significant, that I first updated Angular CLI manually and then I ran
ng update
. This approach should let you safely upgrade to the latest version of Angular CLI.@axacheng it works for me.
My problem was a little bit difference, I’ve got ‘angular.json’ error after execute these steps. To solution the problem, I’ve execute the followings commands at terminal:
After that, I’ve got something like this:
So I’ve execute:
and ng serve works!
Yes, it works after revert to 6.0.8. It seems a issue of 6.1.0.
6.1.1 keep this error
I got this error and it seems to stem from the fact that I have an older version of ng cli on the project vs the version of ng cli installed globally.
I was able to fix this by updating the local ng cli version manually and then migrating it by running:
For CI builds, it may be worthwhile to invoke
./node_modules/.bin/ng
instead of installing@angular/cli
globally.@hansl same happend to me 😦 I’ve tryed ng version same error: