gpt4 book ai didi

npm - 为什么 Yarn 在安装依赖项时会引发错误,而 NPM 不会?

转载 作者:行者123 更新时间:2023-12-04 20:44:07 32 4
gpt4 key购买 nike

我决定试一试 Yarn 并关闭 NPM。不幸的是,我似乎有某种写权限失败,而且错误太神秘了,我无法理解。现在也没有很多关于这方面的信息。尝试运行后 yarnyarn install甚至 yarn cache clean ,我仍然遇到同样的错误:

Trace: 
Error: EISDIR: illegal operation on a directory, read
at Error (native)

这是我的 yarn-error.log的全部内容文件:
Arguments: 
/usr/local/bin/node /usr/local/bin/yarn install

PATH:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Yarn version:
0.16.1

Node version:
6.7.0

Platform:
darwin x64

npm manifest:
{
"name": "PinkBook",
"version": "1.0.0",
"description": "",
"main": "index.js",
"private": true,
"scripts": {
"deploy": "webpack; aws s3 cp ./dist/bundle.js s3://pinkbook",
"dev": "webpack-dev-server --devtool eval --progress --quiet --colors --inline --hot --content-base dist/",
"test": "jest",
"start": "npm-run-all --parallel dev test"
},
"keywords": [],
"author": "merLO <iliareingold@gmail.com>",
"license": "ISC",
"jest": {
"rootDir": "./src",
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"^.+\\.(css|scss)$": "identity-obj-proxy"
},
"verbose": true
},
"devDependencies": {
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
"babel-jest": "^16.0.0",
"babel-loader": "^6.2.5",
"babel-plugin-transform-object-rest-spread": "^6.16.0",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"babel-register": "^6.16.3",
"css-loader": "^0.25.0",
"enzyme": "^2.4.1",
"eslint": "^3.8.1",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1",
"file-loader": "^0.9.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^16.0.1",
"json-loader": "^0.5.4",
"node-sass": "^3.10.1",
"npm-run-all": "^3.1.0",
"open": "0.0.5",
"open-browser-webpack-plugin": "0.0.2",
"react-addons-test-utils": "^15.3.2",
"react-dom": "^15.3.2",
"redux-devtools": "^3.3.1",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"tap-nyan": "0.0.2",
"url-loader": "^0.5.7",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.16.2"
},
"dependencies": {
"amazon-cognito-identity-js": "^1.6.0",
"babel-polyfill": "^6.16.0",
"material-ui": "^0.16.0",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-redux": "^4.4.5",
"react-router": "^2.8.1",
"react-tap-event-plugin": "^1.0.0",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0"
},
"repository": {
"url": "git@bitbucket.org:ilrein/pinkbookserverless.git",
"type": "git"
}
}

yarn manifest:
No manifest

bower manifest:
No manifest

Lockfile:
No lockfile

Trace:
Error: EISDIR: illegal operation on a directory, read
at Error (native)

最佳答案

https://github.com/yarnpkg/yarn/issues/653

Yarn 有一个错误,如果一个 npm 包有一个无效的属性,它就会爆炸,或者如果它有冲突的名称。最常见的是“License”属性,但它也可以是一个包含 README 目录和 README.md 的包。所以在你的依赖树中的某个地方有一个可能没有 License 属性的流氓包,你必须回到使用 NPM 直到 Yarn 被修补。

关于npm - 为什么 Yarn 在安装依赖项时会引发错误,而 NPM 不会?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40287798/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com