Yarn: Could not open cafile

Created on 31 Oct 2016  路  11Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
yarn cli commands producing error

If the current behavior is a bug, please provide the steps to reproduce.
running yarn, yarn test, yarn run dev etc produces an error:
yarn run v0.16.1 error Could not open cafile: ENOENT: no such file or directory

What is the expected behavior?
Error shouldn't occur

Please mention your node.js, yarn and operating system version.
Node.js v4.6.0
Yarn v0.16.1
Win10 x64

P.S. It's still running scripts properly but produces mentioned error.

Most helpful comment

@elyobo try to install v1.3.2

All 11 comments

Duplicate of #1041. This should be fixed on master.

@wyze I am experiencing this issue on windows 10 with v1.2.1, the description is slightly different:
"error Could not open catfile: EISDIR: illegal operation on a directory, read"

Strange. Only happens when running through a shell script. When running directly in the same window there is no problem at all

@Adamfsk I am tried on windows 10 with v.1.2.1 and catch the error, I run it with ConEmu with git bash

error Could not open cafile: EISDIR: illegal operation on a directory, read
$ cpx "src/**/*.scss" ./lib/ && cpx "fonts/*" ./lib/fonts && cpx .npmrc ./lib/ && cpx "styles/*" ./lib/styles
Done in 2.34s.
yarn run v1.2.1
error Could not open cafile: EISDIR: illegal operation on a directory, read
$ ./node_modules/.bin/eslint .\src .\stories .\.storybook .\test --fix --max-warnings 0

my package.json

 "scripts": {
    "build:storybook": "build-storybook",
    "storybook": "start-storybook -p 6006 -s ./storybook-static",
    "build:babel": "yarn run copyFiles && cross-env NODE_ENV=release && yarn run eslint:all && babel ./src --out-dir ./lib",
    "build:clean": "rm -rf lib",
    "build:copy": "rsync -a -h --delete --exclude-from=./tasks/copy-excluded.txt ./src/ ./lib",
    "test": "cross-env NODE_ENV=test mocha -b --reporter dot test",
    "test:watch": "watch \"cross-env NODE_ENV=test mocha -b --reporter dot\" src test",
    "cover": "cross-env NODE_ENV=test nyc --reporter=cobertura --reporter=html --reporter=text-summary mocha --reporter mocha-junit-reporter --reporter-options mochaFile=./coverage/ui-unit-tests.xml",
    "eslint:all": "./node_modules/.bin/eslint .\\src .\\stories .\\.storybook .\\test --fix --max-warnings 0",
    "copyFiles": "cpx \"src/**/*.scss\" ./lib/ && cpx \"fonts/*\" ./lib/fonts && cpx .npmrc ./lib/ && cpx \"styles/*\" ./lib/styles"
  },
  "dependencies": {
    "classnames": ">=2.2.5",
    "normalize.css": "^7.0.0",
    "react": "^16.0.0-rc.3"
  },
  "devDependencies": {
    "@storybook/addon-info": "^3.2.12",
    "@storybook/addon-knobs": "3.2.12",
    "@storybook/addon-options": "3.2.12",
    "@storybook/cli": "^3.2.12",
    "@storybook/react": "3.2.12",
    "babel-cli": "6.26.0",
    "babel-core": "6.26.0",
    "babel-eslint": "^8.0.1",
    "babel-loader": "^7.1.2",
    "babel-plugin-react-transform": "3.0.0",
    "babel-plugin-transform-decorators-legacy": "1.3.4",
    "babel-plugin-transform-dev-warning": "0.1.0",
    "babel-plugin-transform-react-remove-prop-types": "0.4.10",
    "babel-plugin-transform-replace-object-assign": "0.2.1",
    "babel-polyfill": "^6.26.0",
    "babel-preset-env": "^1.6.1",
    "babel-preset-react": "6.24.1",
    "babel-preset-stage-0": "6.24.1",
    "babel-runtime": "6.26.0",
    "chai": "4.1.2",
    "chai-enzyme": "^0.8.0",
    "condition-circle": "1.5.0",
    "cpx": "^1.5.0",
    "cross-env": "^3.2.4",
    "css-loader": "0.25.0",
    "dirty-chai": "2.0.1",
    "enzyme": "3.1.0",
    "enzyme-adapter-react-16": "^1.0.2",
    "eslint": "^3.19.0",
    "eslint-config-defaults": "^9.0.0",
    "eslint-plugin-formatting": "0.0.4",
    "eslint-plugin-import": "^2.7.0",
    "eslint-plugin-react": "^6.10.3",
    "glob": "7.1.1",
    "ignore-styles": "^5.0.1",
    "istanbul": "1.1.0-alpha.1",
    "jsdom": "^9.12.0",
    "material-ui": "^0.19.3",
    "material-ui-icons": "^1.0.0-beta.14",
    "material-ui-next": "npm:[email protected]",
    "mocha": "3.2.0",
    "mocha-junit-reporter": "^1.13.0",
    "node-sass": "^4.5.3",
    "nyc": "^10.2.0",
    "onchange": "3.0.2",
    "prop-types": "^15.6.0",
    "react-addons-test-utils": "^15.6.2",
    "react-dom": "^16.0.0-rc.3",
    "react-test-renderer": "^16.0.0",
    "react-tooltip": "^3.4.0",
    "sass-loader": "6.0.6",
    "semantic-release": "^8.2.0",
    "sinon": "^2.1.0",
    "style-loader": "0.19.0",
    "watch": "^1.0.2"
  },

my yarn config list

{ 'version-tag-prefix': 'v',                                                      
  'version-git-tag': true,                                                        
  'version-git-sign': false,                                                      
  'version-git-message': 'v%s',                                                   
  'init-version': '1.0.0',                                                        
  'init-license': 'MIT',                                                          
  'save-prefix': '^',                                                             
  'ignore-scripts': false,                                                        
  'ignore-optional': false,                                                       
  registry: 'https://registry.yarnpkg.com',                                       
  'strict-ssl': true,                                                             
  'user-agent': 'yarn/1.2.1 npm/? node/v8.7.0 win32 x64',                         
  lastUpdateCheck: 1508757588862 }                                                
info npm config                                                                   
{ '@televic:registry': 'https://nexus.lala.com/repository/react-components',   
  'init.author.name': 'lala',                                                  
  'init.author.email': '[email protected]',                                     
  'init.author.url': 'http://www.lala.com/en/ourteam',              
  email: '[email protected]',                                                   
  'always-auth': true,                                                            
  _auth: 'YnVpbGQuc2VydmVyLm1pcmZ1czp3UjdCVjJ6VVBlbWZ5NmU1',                      
  registry: 'https://registry.npmjs.org/',                                        
  '//registry.npmjs.org/:_authToken': '00000000-0000-0000-0000-000000000000' } 

I'm seeing the same issue.

yarn check v1.2.1
error Could not open cafile: EISDIR: illegal operation on a directory, read

I'm seeing it too, it doesn't appear to be a duplicate of #1041 as that is about adding support for cafile, whereas I don't have any explicitly set and it's still giving me the error.

@elyobo try to install v1.3.2

@palaniichukdmytro you're right, it's fine in v1.3.2 :+1:

I get this error in 1.3.2 so I don't understand how it is fine for elyobo.

i have 1.6 and same error

actiually, i removed this line in .yarnrc starting with cafile and then you are done.

you can find out where you .yarnrc it is looging it in yarn install --verbose, it will show you everything (multiple .yarnrc can be in directories)

Was this page helpful?
0 / 5 - 0 ratings