Error if angular appears as a dependency up the hierarchy
Closed this issue · 4 comments
spacepluk commented
In my case, my app iris-webclient
depends on both angular
and browser-sync
resulting into this error when I try to run browser-sync:
fs.js:502
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/../angular/angular.min.js'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at Object.fs.readFileSync (fs.js:354:15)
at fileContent (/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/server.js:129:15)
at getClientJs (/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/server.js:202:9)
at startServer (/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/server.js:66:23)
at Object.module.exports.startServer [as fn] (/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/async.js:81:41)
at /home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/browser-sync-ui/lib/UI.js:126:14
at iterate (/home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/async-each-series/index.js:8:5)
at /home/spacepluk/workspace/iris-webclient/node_modules/browser-sync/node_modules/async-each-series/index.js:16:16
https://github.com/BrowserSync/UI/blob/master/lib/server.js#L202
shakyShane commented
Confirmed bug - needs http://nodejs.org/api/globals.html#globals_require_resolve
shakyShane commented
de83973#diff-c945a46d13b34fcaff544d966cffcabaR170 seems to do the trick.
shakyShane commented
Fixed in 0.4.6.
BrowserSync deps will be bumped in the next couple of days, but if you want it now, simply run:
npm rm browser-sync && npm install browser-sync
This will re-install the RC9
& you'll get the latest UI.
Thanks for reporting.
spacepluk commented
thanks :)