{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1676","repository_url":"https://api.github.com/repos/NativeScript/nativescript-cli","labels_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1676/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1676/comments","events_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1676/events","html_url":"https://github.com/NativeScript/nativescript-cli/issues/1676","id":147972886,"number":1676,"title":"tns livesync ios error on before-watch hook","user":{"login":"leocaseiro","id":940070,"avatar_url":"https://avatars.githubusercontent.com/u/940070?v=3","gravatar_id":"","url":"https://api.github.com/users/leocaseiro","html_url":"https://github.com/leocaseiro","followers_url":"https://api.github.com/users/leocaseiro/followers","following_url":"https://api.github.com/users/leocaseiro/following{/other_user}","gists_url":"https://api.github.com/users/leocaseiro/gists{/gist_id}","starred_url":"https://api.github.com/users/leocaseiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leocaseiro/subscriptions","organizations_url":"https://api.github.com/users/leocaseiro/orgs","repos_url":"https://api.github.com/users/leocaseiro/repos","events_url":"https://api.github.com/users/leocaseiro/events{/privacy}","received_events_url":"https://api.github.com/users/leocaseiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-13T07:35:11Z","updated_at":"2016-04-29T05:21:18Z","closed_at":"2016-04-21T15:36:43Z","body":"Hi I'm following the [Building Apps with NativeScript and Angular 2](https://tjvantoll.github.io/nativescript-angular-guide/) to build the groceries app. It works fine when I run `tns run ios --emulator` or `tns livesync ios --emulator`, but if I want to watch my files, doesn't work at al..\r\nIs that any way to reload without watch?\r\n\r\nI'm trying to run the follow command:\r\n`tns livesync ios --emulator --watch`\r\n\r\nHere's the error that happens on `before-watch hook` which is basically a require to the file \r\n`nativescript-dev-typescript/lib/watch.js`\r\n\r\nI've runned a trace and the log is on [pastebin](http://pastebin.com/d2iVSWmT).\r\nI post here the main errors:\r\n\r\n### Errors\r\n```shell\r\nBeforeHookName for command watch is before-watch\r\nExecuting before-watch hook from /Users/lcaseiro/Sites/native-script-groceries/hooks/before-watch/nativescript-dev-typescript.js\r\nExecuting before-watch hook at location /Users/lcaseiro/Sites/native-script-groceries/hooks/before-watch/nativescript-dev-typescript.js in-process\r\nFound peer TypeScript 1.8.10\r\nHook promises to signal completion\r\nfs.js:1315\r\n    throw error;\r\n    ^\r\n\r\nError: watch /users/lcaseiro/sites/native-script-groceries ENOENT\r\n    at exports._errnoException (util.js:856:11)\r\n    at FSWatcher.start (fs.js:1313:19)\r\n    at Object.fs.watch (fs.js:1341:11)\r\n    at addDirWatcher (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1036:39)\r\n    at Object.addFile (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1051:21)\r\n    at Object.watchFile (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1172:48)\r\n    at Object.executeCommandLine (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:34546:44)\r\n    at Object.<anonymous> (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:34877:4)\r\n    at Module._compile (module.js:398:26)\r\n    at Object.Module._extensions..js (module.js:405:10)\r\n\r\nFailed during hook execution.\r\nTypeScript compiler failed with exit code 1\r\n```\r\n\r\n\r\n### tns version: 1.7.1\r\n### OSX El Capitan: 10.11.3 \r\n### npm 3.8.6\r\n### Node 5.4.0\r\n\r\n\r\n### npm packages:\r\n```\r\n├── angular2@2.0.0-beta.9\r\n├── es6-promise@3.1.2 extraneous\r\n├── es6-shim@0.33.13 extraneous\r\n├─┬ nativescript-angular@0.0.38\r\n│ └── es6-shim@0.33.13\r\n├─┬ nativescript-dev-typescript@0.3.1\r\n│ └─┬ nativescript-hook@0.2.1\r\n│   ├─┬ glob@6.0.4\r\n│   │ ├─┬ inflight@1.0.4\r\n│   │ │ └── wrappy@1.0.1\r\n│   │ ├── inherits@2.0.1\r\n│   │ ├─┬ minimatch@3.0.0\r\n│   │ │ └─┬ brace-expansion@1.1.3\r\n│   │ │   ├── balanced-match@0.3.0\r\n│   │ │   └── concat-map@0.0.1\r\n│   │ ├─┬ once@1.3.3\r\n│   │ │ └── wrappy@1.0.1\r\n│   │ └── path-is-absolute@1.0.0\r\n│   └─┬ mkdirp@0.5.1\r\n│     └── minimist@0.0.8\r\n├── parse5@1.4.2\r\n├── punycode@1.3.2\r\n├── querystring@0.2.0\r\n├── reflect-metadata@0.1.2\r\n├── rxjs@5.0.0-beta.2\r\n├── shelljs@0.5.3\r\n├─┬ tns-core-modules@2.0.0-angular-4\r\n│ └── tns-core-modules-widgets@1.7.0\r\n├── typescript@1.8.10\r\n├── url@0.10.3\r\n└─┬ zone.js@0.5.15\r\n  └── es6-promise@3.1.2\r\n```\r\n\r\n### gcc --version\r\n```shell\r\n$ gcc --version\r\nConfigured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1\r\nApple LLVM version 7.3.0 (clang-703.0.29)\r\nTarget: x86_64-apple-darwin15.3.0\r\nThread model: posix\r\nInstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\r\n```\r\n\r\n\r\nThanks in advance!\r\n"},"comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/comments/215629112","html_url":"https://github.com/NativeScript/nativescript-cli/issues/1676#issuecomment-215629112","issue_url":"https://api.github.com/repos/NativeScript/nativescript-cli/issues/1676","id":215629112,"user":{"login":"leocaseiro","id":940070,"avatar_url":"https://avatars.githubusercontent.com/u/940070?v=3","gravatar_id":"","url":"https://api.github.com/users/leocaseiro","html_url":"https://github.com/leocaseiro","followers_url":"https://api.github.com/users/leocaseiro/followers","following_url":"https://api.github.com/users/leocaseiro/following{/other_user}","gists_url":"https://api.github.com/users/leocaseiro/gists{/gist_id}","starred_url":"https://api.github.com/users/leocaseiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leocaseiro/subscriptions","organizations_url":"https://api.github.com/users/leocaseiro/orgs","repos_url":"https://api.github.com/users/leocaseiro/repos","events_url":"https://api.github.com/users/leocaseiro/events{/privacy}","received_events_url":"https://api.github.com/users/leocaseiro/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T05:21:18Z","updated_at":"2016-04-29T05:21:18Z","body":"Thank you so much. I've tested now and worked just fine.\r\n\r\nPS: I had to update the brew and install my xcode with: `brew install xcproj`"}}