Atom locks files and folders while running


#1

I cant run npm install for many node modules while atom is running.
the same problem happens when i try to delete a non empty folder with remove-item -path ./some_path -recurse
whenever the console try to change or delete a file in the folder it throws an error.
i tried both with powershell as administrator and with the atom package platformio-ide-terminal.
so far the only solution i have is to close atom every time i need to run those commands.


#2

I have been able to run npm install in folders that are currently open in Atom, so your experience isn’t the case for everyone. What version of Atom and Windows are you running? Are said files open in Atom at the time?


#3

I’m having a similar problem.

My webpack config removes a folder, then tries to add it back, but fails.

clean-webpack-plugin: C:\project-name\dist has been removed.Error: EPERM: operation not permitted, mkdir 'C:\project-name\dist'
    at Error (native)

#5

it happens only on long installs, where there are temporary folders that are deleted before the installation is complete.
that is why i specified that the problem is the locking of folders.
versions:

  • atom: 1.21.1
  • node: 8.9.0
  • npm: 5.5.1
  • windows : 10

#6

how did you solve it?


#7

I thought I had it fixed by upgrading my packages, it ran once, but the second time it failed.


#8

I have a similar problem using Gulp when deleting and creating a folder open in Atom file tree:

EPERM: operation not permitted, mkdir 'C:\Users\xxx\Documents\Sites\xxx\dist'
Details:
    errno: -4048
    code: EPERM
    syscall: mkdir

this problem does not occur when i’m running VS Code.


#9

Just happened to me too, and it was not happening before. I might have to switch to another IDE if not find solution. Doesn’t let me run >npm run serve
Please share if solution found.


#10

15:54:11] Error: EPERM: operation not permitted, mkdir ‘C:\MY CLASSES\UDACITY Web Dev\wittr\build\server\templates’
[15:54:11] ‘serve’ errored after 985 ms
[15:54:11] Error in plugin ‘run-sequence(templates:server)’
Message:
EPERM: operation not permitted, mkdir ‘C:\MY CLASSES\UDACITY Web Dev\wittr\build\server\templates’
Details:
errno: -4048
code: EPERM
syscall: mkdir
path: C:\MY CLASSES\UDACITY Web Dev\wittr\build\server\templates
Stack:
Error: EPERM: operation not permitted, mkdir ‘C:\MY CLASSES\UDACITY Web Dev\wittr\build\server\templates’
[15:54:11] ‘copy’ errored after 297 ms
[15:54:11] Error: EPERM: operation not permitted, mkdir ‘C:\MY CLASSES\UDACITY Web Dev\wittr\build\public’
internal/streams/legacy.js:59
throw er; // Unhandled stream error in pipe.
^

Error: EPERM: operation not permitted, mkdir ‘C:\MY CLASSES\UDACITY Web Dev\wittr\build\public’
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wittr@1.0.0 serve: gulp serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wittr@1.0.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\olgal_000\AppData\Roaming\npm-cache_logs\2018-03-10T21_54_11_699Z-debug.log
PS C:\MY CLASSES\UDACITY Web Dev\wittr>


#11

When close Atom, no issue occurs.


#12

i didn’t find a solution just a work around.
if you minimize the view of the files and folders in atom than it won’t happen.
but i just moved to working with VS code. the IDE startup is much faster (atom’s startup was slow after i added linters) very flexible and easy to use.


#13

Me too! Just switched to VS Code IDE, great so far!


#14

Same here, is there a fix for this yet, its a pain to have to close Atom everytime