I'm following through the Get Started guide for PhoneGap.
I've installed the Phonegap CLI via yarn global add phonegap
.
I then created a new project using phonegap create
.
Now I'm trying to run it with phonegap serve
but immediately I get an error.
[phonegap] starting app server...
/usr/local/share/.config/yarn/global/node_modules/q/q.js:126
throw e;
^
Error: watch /mnt/d/Dev/phonegap-test/www/css/ EPERM
at exports._errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1306:19)
at Object.fs.watch (fs.js:1331:11)
at Gaze._watchDir (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/gaze.js:304:30)
at /usr/local/share/.config/yarn/global/node_modules/gaze/lib/gaze.js:377:10
at iterate (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/helper.js:69:5)
at Object.forEachSeries (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/helper.js:83:3)
at Gaze._initWatched (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/gaze.js:373:10)
at Gaze.add (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/gaze.js:192:8)
at new Gaze (/usr/local/share/.config/yarn/global/node_modules/gaze/lib/gaze.js:74:10)
I'm using Ubuntu Bash for Windows 10. Why doesn't it work?
Phonegap is trying to "watch" the folder for changes.
As of Feb 2017, Windows 10 build 14393 Ubuntu Bash for Windows doesn't support inotify events.
This simply won't work without a workaround.
The good news is that this is being fixed. As of Windows 10 build 14962, the changelog reads:
- Inotify support for files modified through WSL. (GH #216)
This build of Windows is not yet publicly available.
As a workaround for now you can use the Phonegap application for Windows Desktop.