Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
momoadeli opened this issue Oct 19, 2016 · 9 comments · Fixed by #2846
Closed

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

momoadeli opened this issue Oct 19, 2016 · 9 comments · Fixed by #2846

Comments

@momoadeli
Copy link

momoadeli commented Oct 19, 2016

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 momoadeli changed the title Basic ng -version slow (needs 'watchman') Basic ng --version slow (needs 'watchman') Oct 19, 2016
@momoadeli momoadeli changed the title Basic ng --version slow (needs 'watchman') Basic 'ng --version' slow (needs 'watchman') Oct 19, 2016
@tucq88
Copy link

tucq88 commented Oct 20, 2016

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

@momoadeli
Copy link
Author

@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...?

@hassanasad
Copy link

@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.

@momoadeli
Copy link
Author

momoadeli commented Oct 20, 2016

@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!

@tucq88
Copy link

tucq88 commented Oct 21, 2016

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.

@filipesilva filipesilva added the needs: investigation Requires some digging to determine if action is needed label Oct 23, 2016
@momoadeli
Copy link
Author

momoadeli commented Oct 23, 2016

(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.)

@filipesilva
Copy link
Contributor

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 added a commit to filipesilva/angular-cli that referenced this issue Oct 23, 2016
@momoadeli
Copy link
Author

momoadeli commented Oct 23, 2016

@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.

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Oct 23, 2016
@filipesilva filipesilva added type: bug/fix and removed needs: investigation Requires some digging to determine if action is needed labels Nov 2, 2016
filipesilva added a commit that referenced this issue Nov 2, 2016
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this issue Feb 9, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants