Skip to content
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

Workflow won't show when use Volta manage Node version #276

Closed
2 tasks done
BrianCodeItUp opened this issue Jun 13, 2022 · 5 comments
Closed
2 tasks done

Workflow won't show when use Volta manage Node version #276

BrianCodeItUp opened this issue Jun 13, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@BrianCodeItUp
Copy link

FAQ

Describe the bug

I use volta to manage node version. Workflow doesn't show after install this package as global denpendencies.

To Reproduce

  1. Install node through volta, it should install the lastest lts version of node
volta install node
  1. Install @bchatard/alfred-jetbrains as global dependency
yarn global add  @bchatard/alfred-jetbrains 

Expected behavior

Workflow should show after install @bchatard/alfred-jetbrains as global dependency

Alfred Version

4.6.3

Node Version

16.5.1

NPM Version

8.11.0

Jetbrains Product & Version

WebStrom 2022.1.2

Installation type

Classic via .dmg

OS

macOS 12.3.1

@BrianCodeItUp BrianCodeItUp added the bug Something isn't working label Jun 13, 2022
@bchatard
Copy link
Owner

hi,

can you try with npm? and also provide the installation trace?

@BrianCodeItUp
Copy link
Author

BrianCodeItUp commented Jun 14, 2022

Here is the installation trace
image

I suspect that this issue has something to do with how volta handles global dependencies. I'll look into it later.

@bchatard
Copy link
Owner

ok, I double check my env & how I install the workflow for the first time & how I update it.

So I have node installed globally with brew, I use it to install / update the workflow (actually node 18.3 / npm 8.12.1).
Then workflow used the version pined in his package.json

If I understand the doc of Volta, you should run volta install @bchatard/alfred-jetbrains (source: https://blog.volta.sh/2019/06/18/global-installs-done-right/). Before remove completely version install with npm

@BrianCodeItUp
Copy link
Author

I tried to use volta install @bchatard/alfred-jetbrains to install it as global dependency but the result is the same.
Then i remove Volta completely and reinstall node with Homebrew. Then it works.

Then i reinstall Volta again and it still works. I'll look into it later. But we now know the solution is remove volta and install node using other means.

@ahoendgen
Copy link
Contributor

ahoendgen commented Jul 19, 2022

I had the same issue and thought these infos could be helpful for others.

I found out that the symlink in the workflows folder is wrong. Volta puts packages in a temp folder which messes things up.

grafik

if you run npm -g list you will see that the packages are installed to e.g. /Users/andre/.volta/tools/image/node/16.14.0/lib and not into the tmp folder (see screenshot).

Volta seems to have a bug with global installs without a bin in the package.

I solved it this way:

I installed node via homebrew but didn't link it so i could keep my volta installation as is.

Then i used the installed npm binary to install the extension e.g. /opt/homebrew/Cellar/node/18.6.0/libexec/bin/npm install -g @bchatard/alfred-jetbrains.

Now the workflow should be listed when you run npm -g list. Anyway it's not installed in alfred, you still have to go to your Alfred.alfredpreferences/workflows folder and symlink the workflow manually e.g. ln -s /Users/YOUR_USER/.volta/tools/image/node/16.14.0/lib/node_modules/@bchatard/alfred-jetbrains /YOUR/PATH/TO/alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains

it took 10 seconds for alfred to recognize the "new" workflow, afterwards it works fine again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants