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

UnhandledPromiseRejectionWarning: Error: Request workspace/configuration failed with message: Cannot read property 'source.fixAll.eslint' of null #950

Closed
JustFly1984 opened this issue Apr 16, 2020 · 6 comments
Labels
info-needed Issue requires more information from poster
Milestone

Comments

@JustFly1984
Copy link

JustFly1984 commented Apr 16, 2020

Got eslint broken for me since yesterday.

Tried to reinstall plugin, removed all plugins except eslint from vscode, have latest eslint in the project. reinstalled vscode

Output of eslint in vscode:

(node:17052) UnhandledPromiseRejectionWarning: Error: Request workspace/configuration failed with message: Cannot read property 'source.fixAll.eslint' of null
    at /Users/justfly/.vscode/extensions/dbaeumer.vscode-eslint-2.1.3/server/out/eslintServer.js:1:8961
    at /Users/justfly/.vscode/extensions/dbaeumer.vscode-eslint-2.1.3/server/out/eslintServer.js:1:9255
    at Immediate.<anonymous> (/Users/justfly/.vscode/extensions/dbaeumer.vscode-eslint-2.1.3/server/out/eslintServer.js:1:9616)
    at processImmediate (internal/timers.js:439:21)
(node:17052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3522)
(node:17052) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3522)

I have my settings.json

{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ],
  "eslint.enable": true,
  "eslint.packageManager": "yarn",
  "eslint.options": {
    "configFile": "./.eslintrc.js"
  },
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "stylelint.enable": true,
  "stylelint.autoFixOnSave": true,
  "typescript.preferences.importModuleSpecifier": "non-relative",
  "typescript.tsdk": "node_modules/typescript/lib",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "cSpell.enableFiletypes": [
    "json"
  ]
}

vscode

Version: 1.44.1
Commit: a9f8623ec050e5f0b44cc8ce8204a1455884749f
Date: 2020-04-11T01:47:00.296Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0

My projects running on node 13.11.0

Why does vscode using 12.8.1 node? How can I run vscode with node 13.11.0 ?

I have node running with nvm, and default node is also 13.11.0

Had no issues for this setup for long time

PS VS Code runs extensions on the node version that is built into electron (on which VS Code is based). This cannot be changed. https://stackoverflow.com/questions/45062881/custom-node-version-to-run-vscode-extensions

@JustFly1984
Copy link
Author

crosslinking an issue in vscode repo: microsoft/vscode#95519

@dbaeumer dbaeumer added this to the 2.1.4 milestone Apr 17, 2020
@dbaeumer
Copy link
Member

I have a fix for this in master but to ensure it is working correctly I tied to reproduce this but I can't. Can you still reproduce this. If so can you provide me with a GitHub repository I can clone.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Apr 17, 2020
@JustFly1984
Copy link
Author

@dbaeumer I'm not sure that it is about the repo itself, but I can provide you access to one of my private repo.

@JustFly1984
Copy link
Author

@dbaeumer https://github.com/JustFly1984/drivefromto-gatsby/invitations
please remove repo after you test fix.

@dbaeumer
Copy link
Member

@JustFly1984 It works for me with my latest preview version.

Can you please give it a try and let me know if it works for you as well. It is available here: https://github.com/microsoft/vscode-eslint/releases/tag/release%2F2.1.4-next.1 and you can install it using the Install Extension from VSIX command.

Thanks.

@JustFly1984
Copy link
Author

@dbaeumer You are awesome! 2.1.4 is working for me too! Thank you

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants