为什么Yarn在安装依赖项时会引发错误,但NPM却没有?

我决定给Yarn一个机会并关掉NPM.不幸的是,我似乎有某种写权限失败,而且这个错误让我无法理解.现在也没有关于此的大量信息.在尝试运行纱线和纱线安装甚至纱线缓存干净后,我仍然遇到同样的错误:

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

纱线有一个错误,如果一个npm包有一个无效的属性它会炸弹,或者它的名字有冲突.最常见的是“许可”属性,但它也可以是包含README目录和README.md的包.因此,在您的依赖关系树中的某个地方,可能没有许可证属性的流氓包,您必须回到使用NPM,直到修补Yarn.

转载注明原文:为什么Yarn在安装依赖项时会引发错误,但NPM却没有? - 代码日志