Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EINVAL: invalid argument, read

I'm working with node v11.5 and npm 6.4.1 on a flash drive E, on win 7, I'm trying to install the lastest netlify cli. Following https://cli.netlify.com/getting-started , I have:

$ npm install netlify-cli -g
npm ERR! code EINVAL
npm ERR! EINVAL: invalid argument, read

The error log shows pretty much the same thing:

12961 verbose stack Error: EINVAL: invalid argument, read
12961 verbose stack     at E:\nodejs\node_modules\npm\node_modules\gentle-fs\lib\rm.js:245:7
12961 verbose stack     at E:\nodejs\node_modules\npm\node_modules\gentle-fs\node_modules\iferr\index.js:13:50
12961 verbose stack     at E:\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
12961 verbose stack     at FSReqCallback.oncomplete (fs.js:161:5)
12962 verbose cwd E:\myproj
12963 verbose Windows_NT 6.1.7601
12964 verbose argv "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "netlify-cli" "-g"
12965 verbose node v11.5.0
12966 verbose npm  v6.4.1
12967 error code EINVAL
12968 error EINVAL: invalid argument, read
12969 verbose exit [ 1, true 

How can I get this working?

like image 823
user1592380 Avatar asked Nov 07 '22 17:11

user1592380


1 Answers

Sometimes some issues happens with npm because of OS or some issue. Try using some other package manager say yarn.

yarn global add netlify-cli

Install yarn using the following command

npm install yarn -g

like image 164
Atishay Jain Avatar answered Nov 09 '22 23:11

Atishay Jain