-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EISDIR: illegal operation on a directory, read #18
Comments
+1. Same issue
|
Please do a fresh install of all of your dependencies (including global). |
Doing a fresh install of project & global packages hasn't helped me personally. I've tested with both npm & yarn and Node v8.11.1 through v10.1.0. The problem seems to be project specific. The same setup works in another directory for me. |
What is your exact environment? I am pretty much sure this is a directory rights problem, not a bug. |
And my permissions are as follows:
My mix config looks like:
|
+1. Same issue |
I had the exact same error, but after some digging the problem in my case was because of a folder ending in '.js'. I suspect that purgecss or laravel-mix-purgecss searches for everything ending with the extensions defined in the config, including css, js, etc. In my case that also returned a folder -- purgecss only works on files and throws this error. To see the folder that throws an error you can temporarily add a console log in var file = _step6.value;
var content = fs.readFileSync(file, 'utf8'); to: var file = _step6.value;
if (fs.lstatSync(file).isDirectory()) {
console.log(file);
}
var content = fs.readFileSync(file, 'utf8'); Rename the folder(s) that gives problems, and rename it. Not the best solution, but it solves the problem for now. I'll see if there's a possibility for changing the glob matching to only match files, and not folders. |
#36 should have fixed this. Feel free to reopen if anyone still has issues. |
I still have this problem when trying to use laravel-mix-purgecss in production builds. Here is my error message:
Here is my package.json: {
"private": true,
"scripts": {
"dev": "yarn development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "yarn development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "yarn production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"@vue/eslint-config-standard": "^5.1.2",
"@vue/eslint-config-typescript": "^5.0.1",
"axios": "^0.19.2",
"cross-env": "^5.1",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.2.1",
"laravel-mix": "^5.0.0",
"laravel-mix-purgecss": "^5.0.0-rc.1",
"mix-tailwindcss": "^1.2.0",
"resolve-url-loader": "^2.3.1",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"tailwindcss": "^1.2.0",
"ts-loader": "^6.2.1",
"typescript": "^3.7.5",
"vue-template-compiler": "^2.6.11"
}
} Here is my webpack.mix.js: const mix = require('laravel-mix')
require('laravel-mix-purgecss')
require('mix-tailwindcss')
mix.ts('resources/js/app.ts', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.tailwind()
if (mix.inProduction()) {
mix.purgeCss()
.version()
} Nevertheless, laravel-mix-purgecss works correctly in my development builds, and my production builds work correctly if I remove UPDATE: It seems this problem affects version 5.0.0-rc.1 only. I've downgraded laravel-mix-purgecss to version 4.2.0 and it seems working correctly now. |
Trying to use laravel-mix-purge-css, I have this error message running npm run prod :
this is my webpack.mix.js
as in #2, I just upgrade from laravel-mix fom 0.* to 2.0.0 to use this package
Hope somebody can help :)
Val
The text was updated successfully, but these errors were encountered: