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

File watching not working on ionic emulate android -l

Open jkobylec opened this issue 10 years ago • 4 comments

I'm using ionic emulate android -l to test my app on an Android emulator using a Windows host, and the .html/.ts/.scss files are not being watched for changes like they are if npm run watch or ionic serve are used.

If I try running npm run watch concurrently with the ionic emulate android -l, the watch process is clearly detecting changes, but then I get an error on my Android emulator screen: "Error: ENOENT: no such file or directory, open 'C:\Users\my_user\my_project_folder\www\index.html'")

And then I see in the output of my ionic emulate android -l terminal that there are errors:

ionic $ Caught exception:
 Error: Error watching file for changes: EPERM
    at exports._errnoException (util.js:1036:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1406:11)

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

and:

 Error: watch C:\Users\my_user\my_project_folder\www\assets\fonts\ ENOENT
    at exports._errnoException (util.js:1036:11)
    at FSWatcher.start (fs.js:1429:19)
    at Object.fs.watch (fs.js:1456:11)
    at Gaze._watchDir (C:\npm\node_modules\ionic\node_modules\gaze\lib\gaze.js:2                                             89:30)
    at C:\npm\node_modules\ionic\node_modules\gaze\lib\gaze.js:358:10
    at iterate (C:\npm\node_modules\ionic\node_modules\gaze\lib\helper.js:52:5)
    at C:\npm\node_modules\ionic\node_modules\gaze\lib\helper.js:61:11
    at C:\npm\node_modules\ionic\node_modules\gaze\lib\gaze.js:420:5
    at iterate (C:\npm\node_modules\ionic\node_modules\gaze\lib\helper.js:52:5)
    at C:\npm\node_modules\ionic\node_modules\gaze\lib\helper.js:61:11

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

The latter seems as though it might be related to another issue I am having where Ionicons are not working in either ionic serve or the emulator? For what it's worth, there is no 'fonts' folder under 'assets' in my project folder.

ionic info says:

Cordova CLI: 6.3.1 Ionic Framework Version: 2.0.0-rc.0 Ionic CLI Version: 2.1.0 Ionic App Lib Version: 2.1.0-beta.1 OS: Windows 7 SP1 Node Version: v6.7.0

jkobylec avatar Oct 11 '16 06:10 jkobylec

FWIW, deleting the .tmp folder and then running ionic serve got the fonts folder set up correctly, but why would this be necessary?

And with that done, ionic emulate android -l is not detecting changes to the source files but it is now detecting changes to the compiled artifacts if npm run watch is concurrently run and thus changing said compiled artifacts upon changes to source files. It doesn't seem the intent is for this to be required, though?

jkobylec avatar Oct 11 '16 06:10 jkobylec

I have a similar problem. I have reported it in another repo ionic-app-scripts/issues/110

jmesa-sistel avatar Oct 11 '16 12:10 jmesa-sistel

This issue was moved to driftyco/ionic-app-scripts#137

jgw96 avatar Oct 12 '16 00:10 jgw96

Hello, thanks for using Ionic! Since this was an issue with ionic-app-scripts and not the cli i have moved this issue to that repo.

jgw96 avatar Oct 12 '16 00:10 jgw96