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

Eslint extension can't detect PNPM new global store location #1462

Closed
harisraharjo opened this issue May 1, 2022 · 8 comments
Closed

Eslint extension can't detect PNPM new global store location #1462

harisraharjo opened this issue May 1, 2022 · 8 comments
Labels
info-needed Issue requires more information from poster

Comments

@harisraharjo
Copy link

After I update my pnpm to version 7.0.0, eslint extension could not work and giving me this Uncaught exception received. Error: Command failed: pnpm root -g at checkExecSyncError (node:child_process:826:11) at execSync (node:child_process:900:15) at Object.get (.....). Probably it's because pnpm changes it's global store location

@dbaeumer
Copy link
Member

dbaeumer commented May 2, 2022

@harisraharjo

can you run pnpm root -g in a command prompt and let me know the outcome.

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label May 2, 2022
@harisraharjo
Copy link
Author

I did that yesterday and if I remembered correctly it tells me to run pnpm setup. Right now if I run pnpm root -g it gives me the new pnpm store location but the extension still doesn't work

@harisraharjo
Copy link
Author

I also tried to uninstall-reinstall the extension but still doesn't work

@doubleplusc
Copy link

I've encountered the same issue on Linux.

Error: Command failed: pnpm root -g
/bin/sh: line 1: pnpm: command not found
    at checkExecSyncError (node:child_process:835:11)
    at execSync (node:child_process:909:15)
    at node:electron/js2c/asar_bundle:5:12692
    ...

Running pnpm root -g in the command prompt gives me
/home/doubleplusc/.local/share/pnpm/global/5/node_modules

I set eslint.nodeEnv to the string above but the error persists.

Seems like the plugin does not have access to the pnpm command. In the VSCode terminal and a standalone terminal, I can run pnpm just fine.

@dbaeumer
Copy link
Member

dbaeumer commented May 3, 2022

How do you install pnpm ?

@harisraharjo
Copy link
Author

Via corepack

@doubleplusc
Copy link

I used npm install -g pnpm

@harisraharjo
Copy link
Author

Strangely, it works after I shut down my laptop. For people who encountered this issue, try to shut down your machine. I will close this issue for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants