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

Could not start watchman; falling back to NodeWatcher for file system events. #1390

Closed
Devansh3790 opened this issue Jul 20, 2016 · 19 comments
Closed

Comments

@Devansh3790
Copy link

Hey, I am starting using angular-cli and get this error while starting my first app
Following are the details.

  1. OS? Ubuntu 14.04 LTS
  2. $ ng --version:
    angular-cli: 1.0.0-beta.9
    node: 4.4.7
    os: linux x64

Steps :

  1. ng new my-app
  2. cd my-app
  3. ng serve

Looks like you have a different program called watchman, falling back to NodeWatcher.
Visit http://ember-cli.com/user-guide/#watchman for more info.
File: /home/devansh/Documents/Workspace/django-angular2/my-app/src
The Broccoli Plugin: [Funnel] failed with:
Error: watch /home/devansh/Documents/Workspace/django-angular2/my-app/src ENOSPC
at exports._errnoException (util.js:873:11)
at FSWatcher.start (fs.js:1234:19)
at Object.fs.watch (fs.js:1262:11)
at NodeWatcher.watchdir (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/sane/src/node_watcher.js:144:20)
at new NodeWatcher (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/sane/src/node_watcher.js:45:8)
at new sane (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/sane/index.js:17:12)
at EventEmitter.Watcher_addWatchDir as addWatchDir
at /home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/angular-cli-broccoli/lib/builder.js:95:35
at lib$rsvp$$internal$$tryCatch (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at /home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)

The broccoli plugin was instantiated at:
at Funnel.Plugin (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/broccoli-plugin/index.js:10:31)
at new Funnel (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/broccoli-funnel/index.js:44:10)
at Angular2App._buildInputTree (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/lib/broccoli/angular2-app.js:92:7)
at new Angular2App (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/lib/broccoli/angular2-app.js:51:41)
at module.exports (/home/devansh/Documents/Workspace/django-angular2/my-app/angular-cli-build.js:10:10)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:55:19)
at Class.module.exports.Task.extend.init (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/angular-cli/lib/models/builder.js:89:10)
at new Class (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12)
at Class.module.exports.Task.extend.run (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/angular-cli/lib/tasks/serve.js:15:19)
at /home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/angular-cli/lib/commands/serve.js:64:24
at lib$rsvp$$internal$$tryCatch (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17)
at /home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11
at lib$rsvp$asap$$flush (/home/devansh/Documents/Workspace/django-angular2/my-app/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)

Livereload server on http://localhost:49152
Serving on http://localhost:4200/

@Devansh3790
Copy link
Author

I am searching a lot about the above issue but still not fount any solution. I found that i have that issue after my Ubuntu update. I have enabled auto update for my OS and this issue starting after update completed.

@filipesilva
Copy link
Contributor

Closed as this issue was made obsolete by #1455.

@kamok
Copy link

kamok commented Aug 10, 2016

I just encountered this when deploying to Heroku. On development it works fine.

@tonyvince
Copy link

tonyvince commented Sep 1, 2016

@kamok did you find a solution ? same problem here when trying to deploy on heroku.

@kamok
Copy link

kamok commented Sep 1, 2016

@tonyvince Nope. I gave up playing with Angular 2 before it gets out of beta. Currently building projects with Angular 1, and trying React JS.

@gnumoksha
Copy link

I had the same issue and was solved by installation of watchman https://facebook.github.io/watchman/docs/install.html

@mpavel
Copy link

mpavel commented Oct 19, 2016

I had the same issue with Watchman and I actually followed the link mentioned in the cli (http://ember-cli.com/user-guide/#watchman).
Issue resolved by installing watchman like instructed: $ brew install watchman

@tucq88
Copy link

tucq88 commented Oct 20, 2016

I installed watchman but error still shows T_T confusing

https://i.gyazo.com/d2a53aa3dc1552a262a027caf208db55.png

@mpavel
Copy link

mpavel commented Oct 20, 2016

@tucq88, I have watchman under "/usr/local/bin/watchman"

Homebrew:
Homebrew 1.0.8-19-gb9fe36a
Homebrew/homebrew-core (git revision f043; last commit 2016-10-19)

$ which brew
/usr/local/bin/brew

@hariyansahes
Copy link

hariyansahes commented Oct 21, 2016

i have same problem before but now after install watchman is working fine.if you are using linux i think you can install watchman

git clone https://github.com/facebook/watchman.git
cd watchman
./autogen.sh
./configure
make
sudo make install

@tucq88
Copy link

tucq88 commented Oct 21, 2016

@mpavel
Watchman location doesn't matter. It's because when we install watchman with brew install watchman , installation will use default locations for config. It's is user/local/bin which if brew doesn't have sudo permission, it will not be created. You could try run watchman then an not found error will shows.

So my solution is using brew install HEAD watchman, it similar to build it from source like @nevergear suggestion. So ./configure is runned, it will able to create watchman dir => Problem solved.

TL;DR: use brew install HEAD watchman

@filipesilva
Copy link
Contributor

#2846 should make this warning go away. We don't actually use watchman anywhere, it's part of ember-cli. See #2791 for more info.

@jihgao
Copy link

jihgao commented Oct 25, 2016

Try ln -s /Users/tucp/.homebrew/bin/watchman /usr/local/bin/watchman

On 20 Oct 2016, at 11:38 AM, Tu Chu Quang [email protected] wrote:

I installed watchman but error still shows T_T confusing

https://camo.githubusercontent.com/39389612324fe2470d0a16a496def46c7e752797/68747470733a2f2f692e6779617a6f2e636f6d2f64326135336161336463313535326132363261303237636166323038646235352e706e67

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #1390 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AB3qgnY9e9TCUPSw0aai4_GQLrIIOoPkks5q1uIjgaJpZM4JQf23.

@aren55555
Copy link

@tucq88 you more likely want to do brew install --build-from-source watchman such that you are building a release rather than directly from the latest commit (HEAD).

See: Homebrew/homebrew-core#6454

@dcchristopher
Copy link

For OSX: Once you have installed watchman and can confirm by running "watchman --version", make sure it has permissions to the project folder in which you're working: "watchman -p". If this returns an error about "permission denied", you have two options: grant your current user account access to everything on your hard drive or run ng in an elevated shell, e.g. "sudo su -" (the latter worked for me). ... or just get the latest version that does away with the check and the warning ...

@tucq88
Copy link

tucq88 commented Nov 28, 2016

@dcchristopher
I got this image
Is it normal ?

@dcchristopher
Copy link

@tucq88 It looks like you're not having any permission issues related to watchman creating a state file. That's one of the first things it tries to do. For me, running "watchman" (with or without " -p") under my personal user account leads to the permissions error. If I run it in a "sudo su -" session, then it's fine (and I get the same error about insufficient arguments as you).

@daliri72
Copy link

Could not start watchman; falling back to NodeWatcher for file system events.
This means that we don’t have a tool called watchman installed. This tool helps Angular CLI when it needs to monitor files in your filesystem for changes. If you’re running OSX, it’s recommended to install it using Homebrew with the following command

$ brew install watchman

@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests