-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Extension fails with pnpm command not found #148903
Comments
How do you start VS Code? Can you try starting it from a terminal in which |
I always start it via my DE's application menu. |
I have the same problem. In general, there are always various problems with regard to the shell. Why do I think so? Many who use Node use NVM or something similar. I have made many attempts to solve problems of this type, unfortunately I usually fail. Proof of this:
#/bin/zsh
pnpm root -g
/home/seri/.local/share/pnpm/global/5/node_modules #/bin/zsh
/bin/sh -c "pnpm root -g"
/home/seri/.local/share/pnpm/global/5/node_modules #/bin/zsh
/bin/sh
pnpm root -g
/home/seri/.local/share/pnpm/global/5/node_modules I think it would be best if the plugin simply creates an instance of the shell from the automation profile. |
@joaomoreno not sure anymore if this is you or @bpasero. What they actually see is when the start VS Code from the Desktop the environment setup is not complete hence result in cases where ESLint doesn't see |
I start vs code always via |
@Asesjix does |
@dbaeumer Yes absolutely, hence my suggestion to use the shell from the automation profile. Maybe it's helpful information. My setup is quite simple and not extensively configured. I am using Windows with WSL running Debian. Then I installed NVM. Then I install pnpm with To develop, I then start VS Code with That's it. According to these docs except I'm using zsh and pnpm. |
Did you guys update to the newest pnpm version? It now needs a alias in the bash config Try this in your console: |
I know and already did that. |
reload vscode is working for me |
@doubleplusc Do you still hit this? |
Hi @joaomoreno, thanks for following up. I still have the issue on the latest versions of pnpm 7.1.0 and vscode 1.67.2. |
The problem here is somewhere in your bashrc (or equivalent). There's something in your rc shell script which makes loading it very slow. Do you not get a warning about that on startup? |
@doubleplusc Can you check the |
Here's my output:
|
@joaomoreno
|
@doubleplusc I see you're using VSCodium. Can you reproduce this with VS Code? Or VS Code Insiders? If so, can you please send that output instead? |
@joaomoreno Same output on VSCode. The others in this thread who posted their error messages are using VSCode and VSCode Server, so this is not a distribution-specific problem. EDIT: And the Log (Main) output from VSCode.
|
I have a slightly different scenario, but seems related:
pnpm version 7.1.5, installed via settings.json:
|
@bpasero I can't seem to find the necessary steps to debug a bad user env. Can you give @doubleplusc instructions on how he can debug it further? I'll make sure to add it to my Saved Replies so I don't send these issues to you anymore. Meanwhile: @doubleplusc, this is related to your |
@joaomoreno If reproducing is a problem, I've uploaded a VM image (3.5GB download, 7.7GB once imported) that can reproduce the error. It's a fresh OS with pnpm installed and the .bashrc cleared except for some path setting lines. user/pass is test/test. https://drive.google.com/file/d/1LMcQ0qClLVzn__2Dt_pNJMfadCc8OinW/view?usp=sharing Open EndeavourOS menu on the bottom left -> Development -> Visual Studio Code. asd.js should be opened on launch, and Output will eventually show the error. |
If you run |
I added --verbose into the .desktop file Exec line and added These are the lines with
|
If you run VSCode from a terminal, we do not resolve the shell environment (as indicated by |
It definitely feels like shell environment resolution specific because:
And:
@doubleplusc Can you try |
@joaomoreno Good news! I added Is this something that should be fixed in VSCode or the downstream packaging? |
@doubleplusc to clarify, when you reported the output where |
@bpasero I launch via my application menu, it's the only time I get the error. Below is the .desktop file used by the application menu, everything came with the install except for
.desktop file for VSCode:
|
What does |
It's a shell script.
|
Is Can you do one more experiment? Instead of adding |
I don't see The log has only one line with
|
Alright. I have no clue why in your system you explicitly need |
Hello, from a fresh installation in Ubuntu 22.04, I'm not able to make eslint extension work anymore. I've the same problem as @doubleplusc, but when I add the
FYI it doesn't work when I run it from terminal or from .desktop launcher, and:
I've been using this tool for a long time and never had any problems, until today, how can I get eslint plugin working again? |
Ok, I solved the problem: I removed the |
run
and restart your vscode may solve this |
I am getting this issue too, I had to disable |
I had the same error, upgrating VSCode to latest version (1.69) solved the problem |
I previously commented on microsoft/vscode-eslint#1462 but OP's problem was fixed so the issue closed. My problem persists even after a restart, so I am creating a new issue.
I have pnpm installed on Linux via
npm install -g pnpm
. pnpm works fine in the vscode integrated terminal and standalone terminals.The extension fails with the following error on load:
pnpm root -g
returns/home/doubleplusc/.local/share/pnpm/global/5/node_modules
Thanks!
The text was updated successfully, but these errors were encountered: