Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

File watching not working on ionic emulate android -l #137

Closed
jgw96 opened this issue Oct 12, 2016 · 6 comments
Closed

File watching not working on ionic emulate android -l #137

jgw96 opened this issue Oct 12, 2016 · 6 comments
Labels

Comments

@jgw96
Copy link
Contributor

jgw96 commented Oct 12, 2016

From @jkobylec on October 11, 2016 6:32

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

Copied from original issue: ionic-team/ionic-cli#1514

@jgw96
Copy link
Contributor Author

jgw96 commented Oct 12, 2016

From @jkobylec on October 11, 2016 6:56

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?

@jgw96
Copy link
Contributor Author

jgw96 commented Oct 12, 2016

From @jmesa-sistel on October 11, 2016 12:45

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

@jmesa-sistel
Copy link

jmesa-sistel commented Oct 14, 2016

The change I have to do is
Change "run:before": "build" to "run:before": "watch" in package.json
With this change now
"ionic run android -l"
works fine and I can debug properly in VSCode with cordova tools with latest ionic-app-scripts

@jgw96
Copy link
Contributor Author

jgw96 commented Oct 17, 2016

@jkobylec is this still an issue with the latest version of app-scripts and the latest version of the cli? You can see how to update your project here

@jkobylec
Copy link

Same issue with latest app-scripts and CLI versions.

@jgw96 jgw96 added bug and removed needs_reply labels Oct 31, 2016
@danbucholtz
Copy link
Contributor

This should be resolved now.

Thanks,
Dan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants