Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error: EPERM: operation not permitted, write #579

Closed
midascodebreaker opened this issue May 14, 2016 · 38 comments
Closed

Error: EPERM: operation not permitted, write #579

midascodebreaker opened this issue May 14, 2016 · 38 comments

Comments

@midascodebreaker
Copy link

Error: EPERM: operation not permitted, write
Error: EPERM: operation not permitted, write
    at Error (native)
    at Object.fs.writeSync (fs.js:706:20)
    at SyncWriteStream.write (fs.js:2059:6)
    at Console.warn (console.js:44:16)
    at Object.module.exports.error (C:\Users\Uriah\Codes\vue-ui\resources\assets\js\vue-ui\node_modules\eslint\lib\logging.js:26:23)
    at printResults (C:\Users\Uriah\Codes\vue-ui\resources\assets\js\vue-ui\node_modules\eslint\lib\cli.js:79:13)
    at Object.cli.execute (C:\Users\Uriah\Codes\vue-ui\resources\assets\js\vue-ui\node_modules\eslint\lib\cli.js:191:17)
    at lintJob (C:\Users\Uriah\.atom\packages\linter-eslint\lib\worker.js:30:10)
    at C:\Users\Uriah\.atom\packages\linter-eslint\lib\worker.js:66:20
    at Emitter.emit (C:\Users\Uriah\.atom\packages\linter-eslint\node_modules\process-communication\node_modules\sb-event-kit\lib\emitter.js:70:19)
@Arcanemagus
Copy link
Member

What version of eslint do you have installed in that project?

@mikecousins
Copy link

I'm getting this with:

"eslint": "3.2.2",
"eslint-config-airbnb": "10.0.0",
"eslint-plugin-import": "1.12.0",
"eslint-plugin-jsx-a11y": "2.0.1",
"eslint-plugin-react": "6.0.0",

@mikecousins
Copy link

image

Are you guys seeing this too? It's pretty unusable right now.

@IanVS
Copy link
Member

IanVS commented Aug 4, 2016

No, I have not seen that and am having trouble thinking about what might be causing it. I know it sounds crazy, but have you tried restarting Atom lately? Sometimes that solves strange problems like this (for some unknown reason).

@snowcxt
Copy link

snowcxt commented Aug 4, 2016

experiencing same issue here since I updated eslint from 3.1.1 yesterday

    "eslint": "3.2.2",
    "eslint-config-airbnb": "^10.0.0",
    "eslint-loader": "^1.5.0",
    "eslint-plugin-import": "^1.12.0",
    "eslint-plugin-jsx-a11y": "^2.0.1",
    "eslint-plugin-react": "^6.0.0",

image

@IanVS
Copy link
Member

IanVS commented Aug 4, 2016

Interesting, seems to perhaps be a change in ESLint 3.2. Thanks for the tip, I'll do some investigating tonight.

@mikecousins
Copy link

Yup, it only started happening after the eslint upgrade.

@mikecousins
Copy link

Any luck?

@IanVS
Copy link
Member

IanVS commented Aug 5, 2016

Not so far, I didn't have a chance last night like I hoped. It's high on my list, and I'll let you know if/when I figure out what's going on.

@mikecousins
Copy link

Cool, no problem. Thanks for your efforts!

@akash87
Copy link

akash87 commented Aug 7, 2016

I am facing same issue as @mikecousins. Please look into this.

@LEChaney
Copy link

LEChaney commented Aug 8, 2016

Same

@pavlin99th
Copy link

The breaking change seems to be in eslint-plugin-react v6.0.0, released on 2016-08-01. The note reads

Deprecate require-extension rule, use the eslint-plugin-import extensions rule instead. require-extension still works but will trigger a warning

At the same time eslint-config-airbnb v10.0.0 uses that rule. There is an open issue for that.

@mikecousins
Copy link

mikecousins commented Aug 8, 2016

That shows up as a minor warning when running it via the command-line. It's pretty in your face in Atom and doesn't even mention the actual warning if that's the case..

@IanVS
Copy link
Member

IanVS commented Aug 8, 2016

@akash87, I am not paid for this work and do it in my spare time. Making demands will not help. I am in the middle of a renovation on my house and dealing with family health problems, in addition to tight deadlines at work.

This is open-source, and you're free to investigate and fix the problem if it is causing you pain. I'd be happy to review and merge a PR.

@TerrellV
Copy link

@IanVS I've run into the same issue. As I respect your time, do you know of a fix I can do in the mean time to continue using this in atom? Do I need to install a different version of a certain es-lint package or install a different version of this atom package? I know this might be obvious for some but I'm not entirely sure what the immediate work around is.

@mikecousins
Copy link

mikecousins commented Aug 10, 2016

I just disabled the linter-eslint plugin for now and an instead running it on the command line.

@IanVS
Copy link
Member

IanVS commented Aug 10, 2016

There have been reports of ESLint 3.1.x working without errors, so you could try downgrading to that version.

@TerrellV
Copy link

TerrellV commented Aug 10, 2016

Thank you for the quick response. I reverted back to eslint 3.1.1 and 3.1.0 and neither seemed to solve the problem. Did the classic restarts as well. No luck.

Error in Atom

Error: EPERM: operation not permitted, write
    at Error (native)
    at Object.fs.writeSync (fs.js:706:20)
    at SyncWriteStream.write (fs.js:2064:6)
    at Console.log (console.js:39:16)
    at EventEmitter.Program (C:\Users\Terrell BigT Vest\Projects\terrellvest.com\node_modules\eslint-plugin-react\lib\rules\require-extension.js:103:17)
    at emitOne (events.js:95:20)
    at EventEmitter.emit (events.js:182:7)
    at NodeEventGenerator.enterNode (C:\Users\Terrell BigT Vest\Projects\terrellvest.com\node_modules\eslint\lib\util\node-event-generator.js:40:22)
    at CodePathAnalyzer.enterNode (C:\Users\Terrell BigT Vest\Projects\terrellvest.com\node_modules\eslint\lib\code-path-analysis\code-path-analyzer.js:608:23)
    at CommentEventGenerator.enterNode (C:\Users\Terrell BigT Vest\Projects\terrellvest.com\node_modules\eslint\lib\util\comment-event-generator.js:97:23)

versions

node: 6.1.0
atom: 1.9.8
linter-eslint: 7.2.4
windows: 10

    "eslint": "^3.1.0",
    "eslint-config-airbnb": "^10.0.0",
    "eslint-import-resolver-webpack": "^0.4.0",
    "eslint-plugin-import": "^1.12.0",
    "eslint-plugin-jsx-a11y": "^2.1.0",
    "eslint-plugin-react": "^6.0.0",

eslintrc.json file I was testing with

{
  "extends": "airbnb",
  "rules": {
    "jsx-quotes": 1,
    "react/jsx-": 0
  }
}

@IanVS
Copy link
Member

IanVS commented Aug 10, 2016

"eslint": "^3.1.0", will grab the latest eslint until 4.0.0. You can verify which version is installed with npm ls eslint. You should remove the ^ if you want to specify the version exactly.

@TerrellV
Copy link

Thanks. I went back to eslint3.1.0 but all the other related dependencies didn't quite like that so after resolving the many UNMET PEER DEPENDENCY, the following versions are working with the eslint atom plugin.

@mikecousins
Copy link

Yeah, that's why I just disabled it for now. You have to downgrade quite a few packages to get it working.

@IanVS
Copy link
Member

IanVS commented Aug 10, 2016

Had to go all the way back to [email protected]?

@TerrellV
Copy link

@IanVS I wasn't able to get [email protected] to work. Yes, had to go back to 2.9 to get things working again.

@IanVS
Copy link
Member

IanVS commented Aug 11, 2016

I can't reproduce this so far. I'm on a mac, though, and it looks like maybe everyone having this problem is using windows? Can those on this issue give this comment a 👍 reaction if you're using windows and 👎 if using mac or linux?

@LEChaney
Copy link

LEChaney commented Aug 11, 2016

Easiest fix for me was to just to remove the eslint dependencies from package.json and remove the eslint packages from the node modules folder, change eslint config file so it doesn't use any plugins (make sure it extends recommended only). Then Atomlinter will fall back to its built-in copy of eslint (assuming use global eslint is unticked in settings).

@pavlin99th
Copy link

I'm pretty sure it's the problem described in #418 (comment)
All screenshots show console.log and Windows platform.
I didn't get this error on a Mac. Commenting out rule's deprecation console.log helped me on Windows. You can see which rule causes the error by scrolling the red error popup. Hope this info helps!

@ssimunic
Copy link

Seems like eslint-config-airbnb is causing problems, other styles work fine.

@IanVS
Copy link
Member

IanVS commented Aug 11, 2016

@pavlin99th Yes I think it is something like the issue you linked to, although it looks like airbnb does not use any of the deprecated eslint-plugin-react rules.

Can everyone make sure they are not enabling any of:

  • react/no-comment-textnodes
  • react/wrap-multilines
  • react/require-extension

@IanVS
Copy link
Member

IanVS commented Aug 11, 2016

Ah, I missed it the first time, but it looks like they do use require-extension: https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/rules/react.js#L173 which is deprecated I bet that's the problem. I'll open a PR with them to remove it.

@pavlin99th
Copy link

@IanVS , take a look: #579 (comment)

@IanVS
Copy link
Member

IanVS commented Aug 11, 2016

@pavlin99th Ah, sorry I missed that. You're absolutely right!

So, it seems for now you should be able to add this to your .eslintrc:

"rules": {
    "react/require-extension": "off"
}

Could someone try this and see if it solves the error?

@pavlin99th
Copy link

Could someone try this and see if it solves the error?

I confirm, this solves the error. So, the solution for now is to disable the rules which use console.log (for deprecation warnings) until the issue with stdout on windows is resolved.

@IanVS
Copy link
Member

IanVS commented Aug 11, 2016

until the issue with stdout on windows is resolved

That seems more like an atom bug, do you agree, @Arcanemagus?

@Arcanemagus
Copy link
Member

If I remember correctly it's actually a Node.js bug with older versions (like the one embedded within and used by Atom), either way it's not something that we can really deal with in this package so I'm marking this as closed.

@oksas
Copy link

oksas commented Aug 15, 2016

@IanVS, your solution above (setting "react/require-extension": "off") worked perfectly for me :D

Thanks so much for all your hard work on the project, and for the workaround on this particular issue.

@sompylasar
Copy link

If anyone interested in the fix, please vote for the culprit issue here: jsx-eslint/eslint-plugin-react#783

@sompylasar
Copy link

Update: it's an issue of Atom itself not handling certain inter-process communications correctly.
atom/atom#12504

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests