Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Operation not permitted mkdir \path\\node_modules\\@types\''

I am trying to run the command npm install --no-bin-links as part of trying to fix a different issue. The original issue comes from me trying to install the aldeed:simple-schema package, which resulted in an error about a missing simpl-schema (without an e) dependency. I proceeded to run npm install --save simpl-schema

My project then proceeded to crash, and give an error:

Error: EPERM: operation not permitted, mkdir 'D:\Code\DB-MM- Test\node_modules\@types'
npm ERR!  { [Error: EPERM: operation not permitted, mkdir 'D:\Code\DB-MM-Test\node_modules\@types']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, mkdir 'D:\Code\DB-MM-Test\node_modules\@types'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'mkdir',
npm ERR!      path: 'D:\\Code\\DB-MM-Test\\node_modules\\@types' },
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, mkdir \'D:\\Code\\DB-MM-Test\\node_modules\\@types\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: 'D:\\Code\\DB-MM-Test\\node_modules\\@types',
npm ERR!   parent: 'DB-MM-Test' }

I've looked around online, but couldn't find anything helpful. The only issue that seemed remotely connected was: This post

It seems to me like it's trying to make a directory without a name.

like image 260
Spencer Cornwall Avatar asked Feb 18 '19 16:02

Spencer Cornwall


People also ask

How do I resolve error Eperm Operation not permitted?

How do I fix error Eperm Operation not permitted? Run cmd as administrator Run npm config edit (You will get notepad editor) Change prefix variable to C:\Users\<User Name>\AppData\Roaming\npm Then npm start works in a normal console.

How do I fix NPM install error?

If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).


1 Answers

The IDE is probably holding a lock on the file-system object, blocking it from being updated. It worked for me when I closed my IDE.

like image 190
jcmujica Avatar answered Sep 26 '22 00:09

jcmujica