Grunt Serve watch throws EBUSY warning over mongod.lock

断了今生、忘了曾经 提交于 2019-12-12 03:27:11

问题


I have an app I am building using the full stack angular yeoman generator. I start mongod passing the path to my data folder:

[my local path]/[my new app name]/server/data

In my app i then run the grunt serve task. The app boots up correctly however the watch task throws a warning and then fails to do any live reloads it also causes the app in the browser to continuously load.

The warning I get it:

EBUSY, resource busy or locked "[my local path]/[my new app name]/server/data/mongod.lock"

Not sure what is going on everything I have read about this suggests that I have multiple instances open trying to access the DB but I am pretty sure I do not.

L


回答1:


So after typing the above question I realised what I did wrong pretty quickly.

MAKE SURE YOUR DATA FOLDER IS NOT BEING WATCHED BY GRUNT

I had my data folder within the server folder created by the yeoman project which was being watched by grunt but also locked by mongod. I moved my data folder (I am sure you could ignore the data directory instead) and it now works well.

I hope this saves someone else the 20 mins it took me to figure it out :)

L



来源:https://stackoverflow.com/questions/34679526/grunt-serve-watch-throws-ebusy-warning-over-mongod-lock

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!