Sage 9 - yarn command in theme folder error: EISDIR: illegal operation on a directory, read

trellis

#1

On Mac el capitan Im using trellis/bedrock setup with vagrant. I have sage 9 installed successfully. running: $ yarn command in the theme folder this error occurs:

error An unexpected error occurred: “EISDIR: illegal operation on a directory, read”.

This is the yarn-error.log:

Arguments:
/usr/local/Cellar/node/10.11.0/bin/node /usr/local/Cellar/yarn/1.10.1/libexec/bin/yarn.js install

PATH:
/Users/ddcrbrennan/.npm-packages/bin:/Users/ddcrbrennan/.npm-packages/bin:/usr/local/php5/bin:/usr/local/sbin:/Users/ddcrbrennan/.rvm/gems/ruby-2.1.0/bin:/Users/ddcrbrennan/.rvm/gems/ruby-2.1.0@global/bin:/Users/ddcrbrennan/.rvm/rubies/ruby-2.1.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/ddcrbrennan/.rvm/bin:/Users/ddcrbrennan/.composer/vendor/bin

Yarn version:
1.10.1

Node version:
10.11.0

Platform:
darwin x64

Trace:
Error: EISDIR: illegal operation on a directory, read

npm manifest:
{
“name”: “sage”,
“version”: “9.0.5”,
“author”: “Roots team@roots.io”,
“homepage”: “https://roots.io/sage/”,
“private”: true,
“repository”: {
“type”: “git”,
“url”: “git://github.com/roots/sage.git”
},
“bugs”: {
“url”: “https://github.com/roots/sage/issues
},
“licenses”: [
{
“type”: “MIT”,
“url”: “http://opensource.org/licenses/MIT
}
],
“browserslist”: [
“last 2 versions”,
“android 4”,
“opera 12”
],
“stylelint”: {
“extends”: “stylelint-config-standard”,
“rules”: {
“no-empty-source”: null,
“at-rule-no-unknown”: [
true,
{
“ignoreAtRules”: [
“extend”,
“at-root”,
“debug”,
“warn”,
“error”,
“if”,
“else”,
“for”,
“each”,
“while”,
“mixin”,
“include”,
“content”,
“return”,
“function”
]
}
]
}
},
“scripts”: {
“build”: “webpack --progress --config resources/assets/build/webpack.config.js”,
“build:production”: “webpack --env.production --progress --config resources/assets/build/webpack.config.js”,
“build:profile”: “webpack --progress --profile --json --config resources/assets/build/webpack.config.js”,
“start”: “webpack --hide-modules --watch --config resources/assets/build/webpack.config.js”,
“rmdist”: “rimraf dist”,
“lint”: “npm run -s lint:scripts && npm run -s lint:styles”,
“lint:scripts”: “eslint resources/assets/scripts resources/assets/build”,
“lint:styles”: “stylelint “resources/assets/styles/**/*.{css,sass,scss,sss,less}””,
“test”: “npm run -s lint”
},
“engines”: {
“node”: “>= 6.9.4”
},
“devDependencies”: {
“autoprefixer”: “~8.2.0”,
“browser-sync”: “~2.24.6”,
“browsersync-webpack-plugin”: “^0.6.0”,
“bs-html-injector”: “~3.0”,
“buble-loader”: “^0.4.1”,
“cache-loader”: “~1.2.0”,
“clean-webpack-plugin”: “^0.1.18”,
“copy-globs-webpack-plugin”: “^0.2.0”,
“css-loader”: “^0.28.9”,
“cssnano”: “~4.0.5”,
“eslint”: “~4.19.1”,
“eslint-loader”: “~1.9”,
“eslint-plugin-import”: “~2.14.0”,
“extract-text-webpack-plugin”: “~3.0.2”,
“file-loader”: “^1.1.6”,
“friendly-errors-webpack-plugin”: “^1.6.1”,
“imagemin-mozjpeg”: “~7.0.0”,
“imagemin-webpack-plugin”: “~2.2.0”,
“import-glob”: “~1.5”,
“node-sass”: “~4.9.3”,
“postcss-loader”: “~2.1.0”,
“postcss-safe-parser”: “~3.0”,
“resolve-url-loader”: “~2.3.0”,
“rimraf”: “~2.6”,
“sass-loader”: “~6.0”,
“style-loader”: “^0.22.1”,
“stylelint”: “^8.4.0”,
“stylelint-config-standard”: “~18.2.0”,
“stylelint-webpack-plugin”: “^0.10.5”,
“uglifyjs-webpack-plugin”: “^1.3.0”,
“url-loader”: “^0.6.2”,
“webpack”: “~3.10.0”,
“webpack-assets-manifest”: “^1.0.0”,
“webpack-dev-middleware”: “~2.0.4”,
“webpack-hot-middleware”: “~2.22.3”,
“webpack-merge”: “~4.1.4”,
“yargs”: “~11.0.0”
},
“dependencies”: {
“bootstrap”: “v4.1.3”,
“jquery”: “^3.3.1”,
“popper.js”: “^1.14.4”
}
}

yarn manifest:
No manifest

Lockfile:

THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.

yarn lockfile v1


#2

Downgrade Node to 8.x LTS or some version < 10.

nvm is helpful for this.


#3

Thanks for the reply @knowler - I downgraded to node 8.0.0 with nvm but still produced the same error when running yarn from the theme folder:

10:10:57 (ddcrbrennan) hana $ nvm ls
v0.10.35
-> v8.0.0
v8.9.4
v8.12.0
system
default -> 8.12.0 (-> v8.12.0)
node -> stable (-> v8.12.0) (default)
stable -> 8.12 (-> v8.12.0) (default)
iojs -> N/A (default)
lts/* -> lts/carbon (-> v8.12.0)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.14.4 (-> N/A)
lts/carbon -> v8.12.0
10:11:15 (ddcrbrennan) hana $ node -v
v8.0.0
10:11:18 (ddcrbrennan) hana $ yarn
yarn install v1.10.1
error An unexpected error occurred: “EISDIR: illegal operation on a directory, read”.
info If you think this is a bug, please open a bug report with the information provided in “/Users/ddcrbrennan/Sites/theme.com/site/web/app/themes/hana/yarn-error.log”.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
10:11:28 (ddcrbrennan) hana $


#4

This seems like an issue with your Yarn/NPM install. Maybe try Stack Overflow or GitHub issues.