Closed Looveh closed 4 years ago
If you open a terminal in VSCode, can you run npx? If it is not found, then that's your problem.
@Looveh If you do which npx
in a terminal outside of vsocde, and examine thePATH
variable in a vscode integrated shell, does it contain the path?
When I open VSCode as you'd open any other application on Mac, npx
isn't found on the path. If I open it using code
in bash
, it's there as expected.
@Looveh That is because if you open VSCode from bash, all environment variables (including $PATH) are retained. You can try changing the default shell in VSCode to bash.
This looks a bit relevant: https://github.com/microsoft/vscode/issues/30847#issuecomment-420399383
Not sure what Calva can do about it, except instructions on how to fix it (or work around it, if that is the best we can do).
Also, @Looveh . Is lein
's location on your $PATH
in the integrated terminal, but not npx
?
@PEZ Regarding the linked comment, in MacOS one can update /etc/paths or /etc/paths.d/\<some-file> so that both the OS and terminals have access to it. This way, inconsistencies can be avoided.
If someone uses other ways to update $PATH
, for example via .profile, .bash_profile, .bashrc (assuming bash), then VSCode launched using the app icon will not have access to this additions.
StackExchange: https://unix.stackexchange.com/questions/356688/what-is-the-difference-between-echo-path-and-etc-paths/356720
🙏
I've been using OSX since it was in its first beta, but haven't stumbled across this problem before. 😄
I added some info about this to the docs: https://calva.readthedocs.io/en/dev/quirks.html#command-not-found-errors-on-jack-in
Updating the link to where this is documented, since I was just updating docs and followed the link to this issue: https://calva.io/quirks/#command-not-found-errors-on-jack-in
Issue Type: Bug
Try starting a shadow-cljs project with:
C-M-c C-M-j > shadow-cljs > :app
Getting the error:
Project config:
Extension version: 2.0.85 VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:34:44.548Z) OS version: Darwin x64 19.3.0
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)| |GPU Status|2d_canvas: enabledflash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.10GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|