angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Build is not kicking off in a browser on save

Open kuncevic opened this issue 9 years ago • 81 comments

OS

Windows 10.

Versions.

angular-cli: 1.0.0-beta.28.3
node: 6.9.2
os: win32 x64
@angular/common: 2.4.5
@angular/compiler: 2.4.5
@angular/core: 2.4.5
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.5
@angular/http: 2.4.5
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.5
@angular/platform-browser-dynamic: 2.4.5
@angular/router: 3.4.5
@angular/compiler-cli: 2.4.5

Repro steps.

Migrate from beta.24 to beta.28.3 Modify any file Click save Chrome dev console saying:

[WDS] App updated. Recompiling...
[WDS] Nothing changed.

The new build is not kicking off

So had to stop and reastart ng serve manually

kuncevic avatar Feb 02 '17 04:02 kuncevic

@aprades cd to your project and run npm install --save @ngtools/[email protected] in that directory

dev avatar Feb 02 '17 11:02 dev

Ok, it doesn't work with @ngtools/[email protected]

With @ngtools/[email protected] it works fine.

aprades avatar Feb 02 '17 12:02 aprades

Great @aprades!

dev avatar Feb 02 '17 12:02 dev

I freshly installed angular-cli npm uninstall -g angular-cli && npm i -g angular-cli and im getting the following warnings:

npm WARN optional Skipping failed optional dependency /angular-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN @angular/[email protected] requires a peer of zone.js@^0.7.2 but none was installed.

Trying ng --version gives me a lot of Cannot find module 'reflect-metadata' Errors. Is this related to the restructuring of the cli packages?

Previously it worked just fine.

niklas-dahl avatar Feb 02 '17 12:02 niklas-dahl

@niklas-dahl The new npm name for the project is @angular/cli try:

npm install -g @angular/cli

RicardoVaranda avatar Feb 02 '17 12:02 RicardoVaranda

Thanks, @legit . Installing @ngtools/[email protected] resolved my issue.

lukichev avatar Feb 02 '17 13:02 lukichev

@RicardoVaranda that worked, but installing angular-cli should still work I guess,,

niklas-dahl avatar Feb 02 '17 13:02 niklas-dahl

@niklas-dahl I believe it installs beta 28.3 instead of 29 if you use angular-cli.

RicardoVaranda avatar Feb 02 '17 13:02 RicardoVaranda

Same as #4355 but replacing angular-cli: 1.0.0-beta.28.3 with @angular/cli: 1.0.0-beta.29

$ npm show @ngtools/webpack version 1.2.6

emazv72 avatar Feb 02 '17 15:02 emazv72

I don't see any release for beta 29. Latest is 28. How can this work?

MickL avatar Feb 02 '17 18:02 MickL

@MickL try this: https://www.npmjs.com/package/@angular/cli

hneuer avatar Feb 02 '17 18:02 hneuer

Is this issue fixed for beta 29?

MickL avatar Feb 02 '17 18:02 MickL

I dont know, I just wanted to point you to the current beta

hneuer avatar Feb 02 '17 18:02 hneuer

I don't have the issue with beta 29. The install procedure has changed a bit: npm install -g @angular/cli@latest

aprades avatar Feb 02 '17 18:02 aprades

For what it's worth, it still doesn't work in beta 29 for me, but reverting to @ngtools/[email protected] does work

jloosli avatar Feb 02 '17 21:02 jloosli

ng v

angular-cli: 1.0.0-beta.28.3 node: 6.9.2 os: win32 x64

npm uninstall -g angular-cli npm cache clean npm i -g @angular/cli@latest ... ng v

@angular/cli: 1.0.0-beta.29 node: 6.9.2 os: win32 x64

ng new multimodule --routing--style=scss

cd multimodule

npm i -S @ngtools/[email protected]

Works fine!

web-dave avatar Feb 02 '17 21:02 web-dave

I've got in to another trouble https://github.com/angular/angular-cli/issues/4380 after migrating my current project from beta.28.3 to beta.29 So I just rolled back to beta.28.3 for now + npm install @ngtools/[email protected] on top of it

kuncevic avatar Feb 03 '17 00:02 kuncevic

Just tested with beta.30 which is coming with @ngtools/[email protected] is still having the the same issue.

[WDS] App updated. Recompiling...
[WDS] Nothing changed.

npm install @ngtools/[email protected] do not helps with beta.30 I am back to beta.28.3 + npm install @ngtools/[email protected] again.

kuncevic avatar Feb 03 '17 05:02 kuncevic

@kuncevic same issue here, npm clean, reinstalled beta.30 and tested on a new blank project. Major issue, I'm going to revert to beta.28.3 Too bad because performance improved a lot in the last cycle.

emazv72 avatar Feb 03 '17 09:02 emazv72

For me, right now it only works with "@angular/[email protected]" and @ngtools/[email protected]

raducostea avatar Feb 03 '17 10:02 raducostea