EPERM: operation not permitted, open '...\tmp\build.lock'

Hello. I’m doing internship at a company and I can compile and run their projects on MacOS. After I switched to Window10, I could successfully build the project, but if I try to modify code and save it, then it shows errors like EPERM: operation not permitted, open ‘…\tmp\build.lock’.

Btw I tried running cmd as administrator. Do anyone have insights on this error? Thanks

A quick search over on GitHub suggests that this build.lock is being written by ember-cli-rails-addon (note: next time including the full stack trace would make finding that info out a bit easier):

There could be a few different things going on (as far as I can tell at least):

  • the tmp directory doesn’t exist (and that addon doesn’t try to create it) so attempting to open a file within tmp fails: try making a tmp folder
  • either tmp or this specific file is marked as hidden in windows (and node has a hard time reading hidden files based on a very quick search)

Hope that helps!