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

Not working with yarn2 / berry (PnP)? #105

Open
billyvg opened this issue Feb 24, 2021 · 6 comments
Open

Not working with yarn2 / berry (PnP)? #105

billyvg opened this issue Feb 24, 2021 · 6 comments
Labels
wontfix This will not be worked on

Comments

@billyvg
Copy link

billyvg commented Feb 24, 2021

I have looked at existing issues like #11, #46, #49 and have followed suggestions there and still can't get this working.

I have run

yarn dlx @yarnpkg/pnpify --sdk vim vscode

I have the shims in .yarn/sdks, the config file is correct. If I run :CocLocalConfig, it brings up the correct config file.

When I run :CocCommand eslint.lintProject this is the error I get:

2021-02-23T18:31:52.298 INFO (pid:13052) [attach] - receive notification: runCommand [ 'eslint.lintProject' ]
2021-02-23T18:31:52.619 ERROR (pid:13052) [node-client] - request error on "nvim_call_function" [
  'coc#task#start',
  [
    'ESLINT',
    {
      cmd: 'eslint',
      args: [Array],
      cwd: '/Users/billy/Dev/sentry-development-metrics'
    }
  ]
] Vim(let):E475: Invalid value for argument cmd: 'eslint' is not executable Error
    at eM.request (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:20:34604)
    at eM.call (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:22:6260)
    at l0.start (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:187:1807)
    at EslintTask2.start (/Users/billy/.config/coc/extensions/node_modules/coc-eslint/lib/index.js:4120:28)
    at /Users/billy/.config/coc/extensions/node_modules/coc-eslint/lib/index.js:4093:32
    at async FP.runCommand (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:253:7463)
    at async OP.cocAction (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:255:6332)
    at async eM.<anonymous> (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:129:12652)
2021-02-23T18:31:52.619 ERROR (pid:13052) [commands] - Error
    at eM.request (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:20:34604)
    at eM.call (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:22:6260)
    at l0.start (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:187:1807)
    at EslintTask2.start (/Users/billy/.config/coc/extensions/node_modules/coc-eslint/lib/index.js:4120:28)
    at /Users/billy/.config/coc/extensions/node_modules/coc-eslint/lib/index.js:4093:32
    at async FP.runCommand (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:253:7463)
    at async OP.cocAction (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:255:6332)
    at async eM.<anonymous> (/Users/billy/.config/nvim/plugged/coc.nvim/build/index.js:129:12652)

Other logs

vim version: NVIM v0.5.0-dev+nightly-210-gc64cce906
node version: v14.15.5
coc.nvim version: 0.0.80-bcc57aa73c
- ✓ coc-eslint Current version 1.4.5 is up to date.
- ✓ coc-highlight Current version 1.2.7 is up to date.
- ✓ coc-jest Current version 1.1.3 is up to date.
- ✓ coc-json Current version 1.3.4 is up to date.
- ✓ coc-pyright Current version 1.1.113 is up to date.
- ✓ coc-python Current version 1.2.13 is up to date.
- ✓ coc-tsserver Current version 1.6.8 is up to date.
@chemzqm chemzqm added the wontfix This will not be worked on label Feb 24, 2021
@chemzqm
Copy link
Member

chemzqm commented Feb 24, 2021

The problem is where is eslint executable when you're using yarn2?

@billyvg
Copy link
Author

billyvg commented Feb 24, 2021

@chemzqm It's in .yarn/sdks/eslint/bin/eslint.js and in my .vim/coc-settings.json I have this config: "eslint.nodePath": ".yarn/sdks". (This was done by the pnpify package). I've also tried the full path and it does not work.

@billyvg
Copy link
Author

billyvg commented Feb 24, 2021

Also odd, my TSC works fine:
image

@chemzqm
Copy link
Member

chemzqm commented Feb 24, 2021

Where is eslint executable inside ".yarn/sdks" ?

@billyvg
Copy link
Author

billyvg commented Feb 24, 2021

It's .yarn/sdks/eslint/bin/eslint.js

@guysherman
Copy link

Is there a way to configure it to just run yarn eslint instead of eslint? That would seem to be the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants