Comments (20)
I suggest addressing the first issue on your list to start with. Fish should work consistently with WebStorm, rather than sporadically. For what it's worth, I use Visual Studio Code and have not encountered any problems.
from nvm.fish.
I'm going to mark this as stale and close it, as it doesn't seem to be directly related to nvm.fish. Let me know if you have any other questions. Thanks!
from nvm.fish.
Killing all VSCode processes has helped
Sometimes you just need to restart tools 🤷
from nvm.fish.
But now the system node has priority over the nvm version
from nvm.fish.
Only in VSCode?
from nvm.fish.
I've just set up a new MacBook and I might be having the same problem in WebStorm. 😞
I tried checking the environment in both my regular terminal and the WebStorm integrated terminal, and it looks like nvm isn't being loaded at all in WebStorm:
WebStorm integrated terminal
> ps -f | string match --all '*fish*'
502 3935 3872 0 3:51PM ttys000 0:00.03 /opt/homebrew/bin/fish --login -i
> set --show | string match --all '*nvm*'
Regular terminal
> ps -f | string match --all '*fish*'
502 2318 2316 0 3:29pm ttys000 0:00.90 /opt/homebrew/bin/fish --login --init-command printf '\x1b\x50\x24\x647b22686f6f6b223a2022496e69745368656c6c222c202276616c7565223a207b227368656c6c223a202266697368227d7d\x9c'
> set --show | string match --all '*nvm*'
$PATH[1]: |/Users/username/.local/share/nvm/v18.14.2/bin|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files: set in universal scope, unexported, with 7 elements
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[1]: |~/.config/fish/functions/_nvm_index_update.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[2]: |~/.config/fish/functions/_nvm_list.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[3]: |~/.config/fish/functions/_nvm_version_activate.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[4]: |~/.config/fish/functions/_nvm_version_deactivate.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[5]: |~/.config/fish/functions/nvm.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[6]: |~/.config/fish/conf.d/nvm.fish|
$_fisher_jorgebucaran_2F_nvm_2E_fish_files[7]: |~/.config/fish/completions/nvm.fish|
$_fisher_plugins[2]: |jorgebucaran/nvm.fish|
$nvm_current_version: set in global scope, exported, with 1 elements
$nvm_current_version[1]: |v18.14.2|
$nvm_data: set in universal scope, unexported, with 1 elements
$nvm_data[1]: |/Users/username/.local/share/nvm|
$nvm_default_version: set in universal scope, unexported, with 1 elements
$nvm_default_version[1]: |lts|
$nvm_mirror: set in universal scope, unexported, with 1 elements
$nvm_mirror[1]: |https://nodejs.org/dist|
This is a fresh setup. Fish installed via Homebrew.
from nvm.fish.
Ugh, scratch that. Disabling Shell integration
in WebStorm seems to fix the problem:
No idea what that's doing to prevent nvm from loading. 🤷
from nvm.fish.
Ahh, but WebStorm unfortunately still can't auto-detect the path to the node
executable. 😞
Probably need something like NVM_SYMLINK_CURRENT
for that, but that's a separate feature request.
from nvm.fish.
Are you using nvm.fish or nvm.sh?
from nvm.fish.
nvm.fish
from nvm.fish.
Is Fish your main shell? Is Web Storm configured to use Fish as its default shell?
from nvm.fish.
Yep and yep. 🙂
from nvm.fish.
And this problem only occurs inside Web Storm? At this point, I'd have to look at your config.fish.
from nvm.fish.
Tbh WebStorm is the only editor I have installed right now, so I'm honestly not sure if this is a WebStorm-specific issue. 🤷
For config.fish
though:
> cat ~/.config/fish/config.fish
if status is-interactive
# Commands to run in interactive sessions can go here
end
Is it supposed to have more in it?
from nvm.fish.
No, you are not supposed to have anything in it specifically for nvm.fish, I was just wondering if there might be something in there conflicting with nvm.fish, but that doesn't appear to be the case.
Can you reproduce the issue outside Web Storm, i.e. in your terminal?
from nvm.fish.
Terminal is fine; both nvm install/use
and $nvm_default_version
seem to work as expected. 👍
from nvm.fish.
I still have it in VSCode (also with shell integration enabled). Does it count as the case outside of WebStorm?
from nvm.fish.
Temporarily fixed it for me:
code $__fish_config_dir/config.fish
if status is-interactive
# Commands to run in interactive sessions can go here
+ nvm use > /dev/null 2>&1
end
from nvm.fish.
Including nvm use
in config.fish
unfortunately doesn't solve the problem for WebStorm - it's still unable to automatically find the node
path. 😢
I did some further investigation:
If I have nvm use
in config.fish
, leave Shell integration
disabled (as mentioned above), and open WebStorm's integrated terminal, I see a "Now using Node v..." message. So config.fish
is at least running when opening WebStorm's terminal. But that doesn't seem to help with the IDE's auto-detection of node
. 🤷
Interestingly, if I have nvm use
in config.fish
, re-enable Shell integration
, and open WebStorm's integrated terminal, I see an "Can't use Node ..., version must be installed first" error instead, even if that Node version is installed.
So something about WebStorm's Shell integration
is preventing nvm from accessing its installed node
versions. Not sure if that's related to the node
path auto-detection issues or not.
from nvm.fish.
I'm not sure if this is the plugin, fish, or VSCode problem but maybe somebody here can address me.
This seems to be IDE side. I also am having issues (WebStorm for me). I normally have just accepted workarounds as reality but spent a good hour debugging random stuff today related to this. Some findings (no solutions)
- I have WebStorm set to use fish, but it only does sometimes
- For example, the terminal works perfect, including with nvm. (Settings > Tools > Terminal > Shell path:
/opt/homebrew/bin/fish
) - But running file watchers do not work.
echo $SHELL
prints path to fish, but it is running in some sort of POSIX syntax. - To fix file watchers, I created one-off script files with specific shebang line
#!/opt/homebrew/bin/fish nvm use npx stylelint $argv
- Running
which node
for a file watcher failed andecho $PATH
only used the system path
🤷🏻♂️
from nvm.fish.
Related Issues (20)
- support for man pages HOT 5
- Node is unavailable in new shells HOT 11
- nvim + nvm configuration HOT 5
- Doesn't get installed with fisher HOT 2
- `nvm alias` HOT 5
- download url wrong when `nvm_arch=x64-musl` HOT 2
- nvm install-latest-npm equivalent HOT 4
- install command can fail if run at the same time in multiple terminals HOT 7
- lsr(list-remote), install give me error and list(ls) give me nothing HOT 11
- getting error on line 225 in nvm.fish using fish shell v3.4 & 3.6 HOT 3
- Add nvm exec and nvm run commands HOT 10
- Need to reinstall node on session restart HOT 2
- macOS / brew: After "nvm use default", still node from brew is on path HOT 27
- nvm-exec script HOT 3
- .nvmrc regex too strict HOT 1
- $nvm_default_version not working HOT 2
- note to self - persist across shells
- node is inaccessible until I run nvm use ... HOT 4
- Did nvm.fish compatible with bash version? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvm.fish.