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

Watch and EPERM issues when running ionic serve (v2)

Open Mobius77x opened this issue 10 years ago • 1 comments

When using V2 I have always experienced the following Watch and ENOSP issues when running ionic serve:

Caught exception:
 Error: watch C:\Users\Mark\My Documents\App Development\test2\app\pages\page3\p
age3.scss EPERM
    at exports._errnoException (util.js:893:11)
    at FSWatcher.start (fs.js:1313:19)
    at Object.fs.watch (fs.js:1341:11)
    at createFsWatchInstance (C:\Users\Mark\Documents\App Development\test2\node
_modules\chokidar\lib\nodefs-handler.js:37:15)
    at setFsWatchListener (C:\Users\Mark\Documents\App Development\test2\node_mo
dules\chokidar\lib\nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (C:\Users\Mark\Documents\App Dev
elopment\test2\node_modules\chokidar\lib\nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (C:\Users\Mark\Documents\App Developm
ent\test2\node_modules\chokidar\lib\nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (C:\Users\Mark\Documents\App Development\test2\node
_modules\chokidar\lib\nodefs-handler.js:473:21)
    at FSReqWrap.oncomplete (fs.js:82:15)

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

It is the same as what was raised here:

https://github.com/driftyco/ionic-cli/issues/955

however it doesn't rectify itself during a restart for me. I have been seeing this since Beta2 I think and it is still present in Beta6. It might be related to a deprecated version of graceful-fs dependency as noted here:

https://github.com/driftyco/ionic-cli/issues/960

My current setup is as follows:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS: Windows 8.1
Node Version: v5.11.0

npm version is 3.8.8

Mobius77x avatar Apr 30 '16 14:04 Mobius77x

SOLVED.

I assumed that since I am a single user with Admin rights to my computer that I would automatically be running the command prompts as Administrator. Turns out this is not the case.

By right-clicking on Windows Command Prompt (on Windows 8.1), selecting 'Run as Administrator', and navigating to my project folder and running ionic serve, I was able to run my ionic2 projects/starters flawlessly (i.e. without any errors whatsoever).

Still not sure at the time of writing how to ensure I'm running NodeJS Command Prompt (which I otherwise always use) as Administrator but at least I have a workaround to use the Windows Command Prompt in the interim.

Mobius77x avatar May 02 '16 14:05 Mobius77x