Issue 1:
Electron version: 1.4.7

Operating system: Windows 10 (x64)

Expected behavior

I am typing npm -g install electron. Electron should install as a globally accessible package.

Actual behavior

C:\WINDOWS\system32>npm -g install electron
C:\Users\nakobe\AppData\Roaming\npm\electron -> C:\Users\nakobe\AppData\Roaming\npm\node_modules\electron\cli.js

> electron@1.4.7 postinstall C:\Users\nakobe\AppData\Roaming\npm\node_modules\electron
> node install.js

events.js:160
throw er; // Unhandled 'error' event
^

Error: write EINVAL
at exports._errnoException (util.js:1022:11)
at WriteStream.Socket._writeGeneric (net.js:715:26)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at WriteStream.stream.write (C:\Users\nakobe\AppData\Roaming\npm\node_modules\electron\node_modules\single-line-log\index.js:12:16)
at process.<anonymous> (C:\Users\nakobe\AppData\Roaming\npm\node_modules\electron\node_modules\single-line-log\index.js:17:29)
at emitOne (events.js:101:20)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "-g" "install" "electron"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! electron@1.4.7 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@1.4.7 postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\WINDOWS\system32\npm-debug.log

How to reproduce

npm install -g electron

Things I've tried

I've tried deleting my ~\.electron directory and other node-related files in my home directory. Nothing worked.

Issue 2:
Electron version: 1.4.6

Operating system: Windows 10 v1607, node 7.1.0

Expected behavior

Actual behavior

npm install electron (global -g install or local) fail. Other npm packages install successfully

> node install.js

events.js:160
throw er; // Unhandled 'error' event
^

Error: write EINVAL
at exports._errnoException (util.js:1022:11)
at WriteStream.Socket._writeGeneric (net.js:715:26)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at WriteStream.stream.write (C:\Users\Peter\Desktop\Workspace\node_modules\single-line-log\index.js:12:16)
at process.<anonymous> (C:\Users\Peter\Desktop\Workspace\node_modules\single-line-log\index.js:17:29)
at emitOne (events.js:101:20)

How to reproduce

npm install electron