Skip to content
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

Trying to delete non-existent .eslintcache on read-only file system #11945

Closed
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly core Relates to ESLint's core APIs and features

Comments

@cuki
Copy link
Contributor

cuki commented Jul 4, 2019

Tell us about your environment

  • ESLint Version: 6.0.1
  • Node Version: 8.9.4
  • npm Version: 4.6.1

What parser (default, Babel-ESLint, etc.) are you using?
default

Please show your full configuration:

Configuration
module.exports = {
    "extends": "eslint:recommended"
};

What did you do?
Wanted to try out ESLint 6.* by running it on a simple file within Docker.

However it's trying to delete a non-existent file on a read-only part of the system (root directory of the project). While build/node_modules and src/ do have both read/write permissions.

Pretty sure this would be the case for any other restricted permission file system, for me it just happened to be in Docker.

function hello(){
  console.log('world')
}

hello();
build/node_modules/.bin/eslint --config .eslintrc.js src/test.js

What actually happened?
It seems that it tries to delete the .eslintcache file, which does not exist, on a read-only file system.

Error: EROFS: read-only file system, unlink '/project/.eslintcache'
    at Object.fs.unlinkSync (fs.js:1061:18)
    at CLIEngine.executeOnFiles (/project/build/node_modules/eslint/lib/cli-engine/cli-engine.js:735:20)
    at Object.execute (/project/build/node_modules/eslint/lib/cli.js:209:111)
    at Object.<anonymous> (/project/build/node_modules/eslint/bin/eslint.js:78:28)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)

What did you expect to happen?
For it to run the linter on the specified file. It should not bother trying to delete a file which does not exist.

@cuki cuki added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Jul 4, 2019
@mysticatea mysticatea added accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features and removed triage An ESLint team member will look at this issue soon labels Jul 14, 2019
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Jan 14, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.