tns livesync ios error on before-watch hook
See original GitHub issueHi Iβm following the Building Apps with NativeScript and Angular 2 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β¦
Is that any way to reload without watch?
Iβm trying to run the follow command:
tns livesync ios --emulator --watch
Hereβs the error that happens on before-watch hook
which is basically a require to the file
nativescript-dev-typescript/lib/watch.js
Iβve runned a trace and the log is on pastebin. I post here the main errors:
Errors
BeforeHookName for command watch is before-watch
Executing before-watch hook from /Users/lcaseiro/Sites/native-script-groceries/hooks/before-watch/nativescript-dev-typescript.js
Executing before-watch hook at location /Users/lcaseiro/Sites/native-script-groceries/hooks/before-watch/nativescript-dev-typescript.js in-process
Found peer TypeScript 1.8.10
Hook promises to signal completion
fs.js:1315
throw error;
^
Error: watch /users/lcaseiro/sites/native-script-groceries ENOENT
at exports._errnoException (util.js:856:11)
at FSWatcher.start (fs.js:1313:19)
at Object.fs.watch (fs.js:1341:11)
at addDirWatcher (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1036:39)
at Object.addFile (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1051:21)
at Object.watchFile (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:1172:48)
at Object.executeCommandLine (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:34546:44)
at Object.<anonymous> (/Users/lcaseiro/Sites/native-script-groceries/node_modules/typescript/lib/tsc.js:34877:4)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
Failed during hook execution.
TypeScript compiler failed with exit code 1
tns version: 1.7.1
OSX El Capitan: 10.11.3
npm 3.8.6
Node 5.4.0
npm packages:
βββ angular2@2.0.0-beta.9
βββ es6-promise@3.1.2 extraneous
βββ es6-shim@0.33.13 extraneous
βββ¬ nativescript-angular@0.0.38
β βββ es6-shim@0.33.13
βββ¬ nativescript-dev-typescript@0.3.1
β βββ¬ nativescript-hook@0.2.1
β βββ¬ glob@6.0.4
β β βββ¬ inflight@1.0.4
β β β βββ wrappy@1.0.1
β β βββ inherits@2.0.1
β β βββ¬ minimatch@3.0.0
β β β βββ¬ brace-expansion@1.1.3
β β β βββ balanced-match@0.3.0
β β β βββ concat-map@0.0.1
β β βββ¬ once@1.3.3
β β β βββ wrappy@1.0.1
β β βββ path-is-absolute@1.0.0
β βββ¬ mkdirp@0.5.1
β βββ minimist@0.0.8
βββ parse5@1.4.2
βββ punycode@1.3.2
βββ querystring@0.2.0
βββ reflect-metadata@0.1.2
βββ rxjs@5.0.0-beta.2
βββ shelljs@0.5.3
βββ¬ tns-core-modules@2.0.0-angular-4
β βββ tns-core-modules-widgets@1.7.0
βββ typescript@1.8.10
βββ url@0.10.3
βββ¬ zone.js@0.5.15
βββ es6-promise@3.1.2
gcc --version
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Thanks in advance!
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Nativescript Angular2 tutorial results in error - Stack Overflow
'tns livesync ios --emulator --watch Executing before-prepare hook from /Users//Documents/frontend/sample-Groceries/hooks/before-prepare/nativescript-dev-Β ...
Read more >a problem occurred configuring project ':expo-modules-core'.
2 Executing before-watch hook from C:\Users\Luke\Documents\MobileProjects\HelloWorld\hooks\before-watch\nativescript-dev-webpack.js Copying template filesβ¦
Read more >NativeScript sqlite - OSCHINA - δΈζεΌζΊζζ―δΊ€ζ΅η€ΎεΊ
18th July 2020 # # tns preview # or tns run ios # or tns run android ... before preparing your project before-watch...
Read more >CLI Basics - NativeScript Docs
Overall, the NativeScript CLI's livesync process makes native iOS and Android ... If you get an error at this point you likely haven't...
Read more >How to add a TreeView inside DropDownList
Error while executing gradle -v: Command failed: gradle -v ... before-watch hook from C:\tns\TestAppF\hooks\before-watch\nativescript-dev-typescript.js
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @leocaseiro , This issue is addressed in our release branch and it will be included in the 2.0.0 official release. You can find more information here and here
The bug is with TypeScript, not NativeScript.
TypeScript has made some changes with case-sensitive and the solution @cmoffatt found it to Downgrade to TypeScript@1.7.5, you can read more here: