bchatard / alfred-jetbrains

Alfred5 workflow to easily open your projects with your favorite JetBrains product.
MIT License
620 stars 49 forks source link

Wrong Node version issue #256

Closed Bhelwulf closed 2 years ago

Bhelwulf commented 2 years ago

Describe the bug When I open the Alfred and execute this JetBrains - Open Project and press enter, the list of project doesn't show up. I checked the debugger log, it says:

[01:14:19.111] JetBrains - Open Project - v3[Script Filter] {
"items": [
{
"title": "Wrong Node version. We need v14+ or newer, you have v12.22.4",
...

I use nvm to manage my node version. I use node 14 as my default node version with nvm alias defaultnvm use lts/fermium`. And then I restart every thing but get the same error.

Expected behavior When I execute the JetBrains - Open Project, the list of project shall show up.

Q A
Workflow version 1.7.2
OSX Version 12.0.1
Alfred Version 4.6.3
JetBrains Product/Version WebStorm / 2020.2.4
Node version v14.17.4
NPM version 7.20.3

Is there any thing that I can do to fix this problem? Thanks for the help.

bchatard commented 2 years ago

hi,

since I didn't use this node version manager, I can't help a lot. Did you check your $PATH? Did this help you: https://github.com/bchatard/alfred-jetbrains/blob/main/doc/troubleshooting.md#nvm

Bhelwulf commented 2 years ago

It's weird.

After I add cat $(which bash) and then cat $(node -v) into the beginning of the script and execute a couple of times to find out the cause, suddenly it works. Without knowing the reason. If I can reproduce and find out the root cause, I shall share my findings.

Thanks for the immediate response.

🙏🏾