得到“错误:EINVAL:无效的参数,读取";对于“npm install --save-dev eslint --verbose"; [英] getting "Error: EINVAL: invalid argument, read" for "npm install --save-dev eslint --verbose"
问题描述
这里有关于如何让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
我已经建立了一个新的 react-native 项目:
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
日志的最后一部分:
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 semver@5.4.1~preuninstall: semver@5.4.1
npm info lifecycle semver@5.4.1~uninstall: semver@5.4.1
npm verb unbuild rmStuff semver@5.4.1 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
注意事项:
- 在 Windows 7 上
更新:* npm install --save-dev eslint --verbose
的结果可以在这里找到.
UPDATE:
* Results of npm install --save-dev eslint --verbose
may be found here.
推荐答案
有时,某些软件包会出现 npm 问题.这可能是基于 OS/包版本/节点版本/npm 版本兼容性问题的组合.
Sometimes some packages have issues with npm. This could be base on combination of OS/package version/node version/npm version compatibility issue.
在这种情况下,最好的办法是尝试使用其他包管理器.用纱线试试这个
In such cases best thing is to do is try and use some other package manager. Try this with yarn
yarn add eslint
这篇关于得到“错误:EINVAL:无效的参数,读取";对于“npm install --save-dev eslint --verbose";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!