1.34.0-insider 56f1b4795fed05677eb82a21dac4fc1ab62d747b x64Ubuntu 18.04.2 LTS x86_64Steps to Reproduce:
dbaeumer.jshint
Does this issue occur when all extensions are disabled?: N/A
I also reported it in https://github.com/Microsoft/vscode-jshint/issues/71, but it's probably unrelated to the extension itself.
@dbaeumer What can the user do to figure out what's wrong?
@RMacfarlane took that over. We might want to consider changing the publisher
If there anything in the JSHint output panel?
@NatoBoram do you have jshint itself installed? Your workspace doesn't have a node_modules folder.
Also, can you reproduce with VS Code without Snap? https://update.code.visualstudio.com/latest/linux-x64/insider
@dbaeumer JSHint was installed globally. The workspace isn't a NodeJS project.
jshint --version
jshint v2.10.2
@joaomoreno
No. The .deb works fine.
@NatoBoram does it work if you install jshint locally?
Yes, it works when installed locally.
@NatoBoram Do you use NVM? If you open the Developer Tools and run getLazyEnv().then(console.log), do you get the expected environment?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
Reopening.
@joaomoreno and I looked into this and the problem seems to be that the environment is not correctly sourced when running out of a snap which makes the server fail looking up global node moddules.
Also faced this issue. the problem is with gnome launcher .desktop file. it does not run ~/.bashrc or any other shell environment file. running code from terminal inherits the environment and works just fine.
Fixed it temporarily by editing /var/lib/snapd/desktop/applications/code_code.desktop and changing the Exec line from:
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code %U
to:
Exec=bash -c "source $HOME/.bashrc && env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/code_code.desktop /snap/bin/code %U"
I have a similar issue but the above does not fix it.
If I add VSCode as a favorite from the UBUNTU dash and then click VSCode icon on the sidebar none of my scripts work in VSCode script explorer. I get npm not found.
If I start VSCode within a terminal everything works.
I should have said "none of my npm scripts work
Root cause: https://forum.snapcraft.io/t/new-store-automated-review-rule-is-incorrect/12963/27?u=joaomoreno
Fix should come soon from the snapcraft team!
Fixed by #80585
cc @alexr00
Most helpful comment
Fixed by #80585
cc @alexr00