Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting "Error: EINVAL: invalid argument, read" for "npm install --save-dev eslint --verbose"

Any ideas/assistance here re how to get "npm install --save-dev eslint --verbose" working. I keep getting:

Error: EINVAL: invalid argument, read

I've setup up a new react-native project:

react-native init gcLists

E:\gcLists>npm -v
5.5.1
E:\gcLists>yarn -v
1.2.1
E:\gcLists>react-native -v
react-native-cli: 2.0.1
react-native: 0.49.5

npm install --save-dev eslint --verbose

Last part of the log:

npm http fetch GET 304 https://registry.npmjs.org/slice-ansi 104ms (from cache)
npm verb correctMkdir D:\Users\greg\AppData\Roaming\npm-cache\_locks correctMkdir not in flight; initializing
npm verb lock using D:\Users\greg\AppData\Roaming\npm-cache\_locks\staging-255cd84f0d76b150.lock for E:\gcLists\node_modules\.staging
npm info lifecycle [email protected]~preuninstall: [email protected]
npm info lifecycle [email protected]~uninstall: [email protected]
npm verb unbuild rmStuff [email protected] from E:\gcLists\node_modules
npm verb unlock done using D:\Users\greg\AppData\Roaming\npm-cache\_locks\staging-255cd84f0d76b150.lock for E:\gcLists\node_modules\.staging
npm verb stack Error: EINVAL: invalid argument, read
npm verb stack     at D:\Users\greg\AppData\Roaming\npm\node_modules\npm\lib\utils\gently-rm.js:275:7
npm verb stack     at D:\Users\greg\AppData\Roaming\npm\node_modules\npm\node_modules\iferr\index.js:13:50
npm verb stack     at D:\Users\greg\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm verb stack     at FSReqWrap.oncomplete (fs.js:154:5)
npm verb cwd E:\gcLists
npm verb Windows_NT 6.1.7601
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "D:\\Users\\greg\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "eslint" "--verbose"
npm verb node v8.7.0
npm verb npm  v5.5.1
npm ERR! code EINVAL
npm ERR! EINVAL: invalid argument, read
npm verb exit [ 1, true ]

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Users\greg\AppData\Roaming\npm-cache\_logs\2017-11-03T02_38_08_842Z-debug.log

Notes:

  • On Windows 7

UPDATE: * Results of npm install --save-dev eslint --verbose may be found here.

like image 302
Greg Avatar asked Nov 03 '17 02:11

Greg


1 Answers

Since you are using drive letter E:, you might be on a portable drive. I had the same problem using an USB-Stick formatted on FAT32. I solved it reformatting to NTFS.

like image 112
FPSE Avatar answered Oct 14 '22 00:10

FPSE