Issue: npm errno -4094


(Hardik Sachan) #1

What I Wanted to Do

I wanted to install express, which was normal until last night

What Happened Instead

I got error saying
npm ERR! code UNKNOWN
npm ERR! errno -4094
npm ERR! syscall mkdir
npm ERR! UNKNOWN: unknown error, mkdir ‘C:\Projects\redux-tutoria
l\node_modules.staging\sort-keys-7116812f’

Details

Log file: 2018-09-19T03_49_03_361Z-debug.log (56.0 KB)

Platform Info

$ npm --versions
{ npm: '6.4.1',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.33.0',
  node: '10.10.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.0',
  v8: '6.8.275.30-node.24',
  zlib: '1.2.11' }

$ node -p process.platform
win32


(Matt Fletcher) #2

Do you have anything in your package.json, for example a script, that is running a mkdir command? That’s Mac/Linux only, but you’re running Windows which doesn’t have that command.

I don’t believe this to be a problem with npm itself, but probably something within your setup or code, have a look around for any stray mkdirs.

Otherwise try reinstalling node + npm and see what happens. As for it being fine until last night, I don’t know what may have happened or changed since then so more details on that would be useful :slight_smile:


(Hardik Sachan) #3

First, I’ve not installed any of the packages till then, no mkdir or any other script is being used. i’m running windows 8.1 x64.

I tried reinstalling npm + node.

//Update
Found a temporary solution,

npm cache clear --force

It helps for one install, then again for installing another packages I’ve to run the same command.


(Hardik Sachan) #4

Found a permanent solution specifically for windows:

Fire up your terminal and run the following commands : npm cache verify
if you get errors then run npm cache clear --force

  1. Open ThisPC or MyComputer.
  2. Right Click on C: or the drive where node and npm is installed.
  3. Select Properties on Context Menu and goto tools tab.
  4. Select “Check” or “Check-now” under Error Checking menu.
  5. Let the process complete.
  6. Reboot your PC