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

Basic 'ng --version' slow (needs 'watchman')

Open momoadeli opened this issue 10 years ago • 9 comments

Please provide us with the following information:

OS?

macOS Sierra

Versions: (error and versions below)

Could not start watchman; falling back to NodeWatcher for file system events. Visit http://ember-cli.com/user-guide/#watchman for more info. angular-cli: 1.0.0-beta.17 node: 5.11.1 os: darwin x64

Repro steps.

npm install angular-cli -g and simply type ng --version.

The log given by the failure.

N/A/See above

Anything I do with ng is very slow. Note ng new <PROJ> is indefinite and seems hung. Aborting and using ng new <PROJ> --skip-npm works but is still slow. But let's start with a simple ng --version first. Takes 'long' and the 'watchman' error shows.

Many thanks! Mo


Thanks! We'll be in touch soon.

momoadeli avatar Oct 19 '16 20:10 momoadeli

Please install watchman brew install --HEAD watchman The key is HEAD option, I cant' get it work without that one.

tucq88 avatar Oct 20 '16 04:10 tucq88

@tucq88, although the error indicates that, watchman is not listed in the pre-requisites. I suppose it isn't installed by the angular-cli installer...?

momoadeli avatar Oct 20 '16 14:10 momoadeli

@megabyzus Perhaps because the npm package for watchman is different.

Ref: https://ember-cli.com/user-guide/#watchman

For complete installation instructions, refer to the docs on the Watchman website. Note, there exists a similarly named npm package (watchman) which is not the intended installation.

hassanasad avatar Oct 20 '16 22:10 hassanasad

@hassanasad, thanks for response. However, although angular-cli is rooted on ember-cli, the instructions do not presume that. Again, the only installation instructions are npm install -g angular-cli. I'd really like to focus on that and not presume anything. If there are pre-requisites, then it should be mentioned in the README. I presume, as of now, there aren't.

Given this, what are the formal instructions from the angular-cli team?

Thanks!

momoadeli avatar Oct 20 '16 23:10 momoadeli

I think they was under development and BETA so they may not keep it in mind. But actually I still able to work with ng-cli without watchman, e.g serving and watching. ng-cli used a fallback for watchman already so it's not "actual" pre-requisite. Only got into this trouble when I have to change styleExt (but it could be done manually without using cli command) Btw, we could make a PR to them about this thing. It's up to their decision anyway.

tucq88 avatar Oct 21 '16 07:10 tucq88

(still issue). UPDATE:

Here is the timing of the ng -v command execution:

(time ng -v)

results:

angular-cli: 1.0.0-beta.18 node: 6.8.1 os: darwin x64

real 0m15.135s user 0m2.678s sys 0m0.468s

(BTW, I've updated to latest node and cli beta.18 snd installed watchman too.)

momoadeli avatar Oct 23 '16 19:10 momoadeli

The watchman thing has to do with the ember-cli addon system. I don't think we use watchman anywhere really.

There might be a way to completely bypass this check, but probably it'll be a hack.

filipesilva avatar Oct 23 '16 19:10 filipesilva

@filipesilva , Thanks. I understood early on watchman was ancillary to this lagging issue. Note, it's taking approx 15 seconds to execute

ng -v

with or without watchman.

Thanks for looking into this.

momoadeli avatar Oct 23 '16 20:10 momoadeli

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.