npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Program Files\Git\usr\local
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Git\usr\local'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Git\usr\local'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\Git\\usr\\local'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Razor\AppData\Local\npm-cache\_logs\2022-05-02T11_23_07_449Z-debug.log
Asked
Active
Viewed 217 times
-1
-
You are not likely to get a good response with this question. Create the simplest, shortest code example that reproduces the problem. Take a look at [How to write effective questions](https://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Reproducible Example](http://stackoverflow.com/help/reprex). – Tyler2P May 02 '22 at 13:08
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 02 '22 at 18:16
1 Answers
0
This line looks very odd: npm ERR! path C:\Program Files\Git\usr\local
.
Did you perhaps run npm config set prefix /usr/local
at some point? It looks like npm is failing on the mkdir
command and that this is more of a permissions or configuration issue than a Sanity/Javascript/Express one.
You could try following the instructions of this answer or—if that doesn't work—the cache clean
comment here.

Geoff Ball
- 743
- 3
- 14