Comments (25)
@linuxjuggler thanks for your help :)
from alfred-jetbrains.
Did you use nvm (or similar tools)?
Can you provide the content of /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
(ls -hAl /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
)?
from alfred-jetbrains.
No, I do not use nvm or other similar tool.
➜ ~ $ ls -hAl /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
total 232
-rw-r--r--@ 1 devangs admin 186B Oct 26 1985 .editorconfig
drwxr-xr-x@ 3 devangs admin 96B May 3 13:17 .github
-rw-r--r--@ 1 devangs admin 11B Oct 26 1985 .prettierignore
-rw-r--r--@ 1 devangs admin 1.1K Oct 26 1985 LICENSE
-rwxr-xr-x@ 1 devangs admin 3.5K Oct 26 1985 README.md
drwxr-xr-x@ 4 devangs admin 128B May 3 13:17 doc
-rw-r--r--@ 1 devangs admin 63K Oct 26 1985 icon.png
-rw-r--r--@ 1 devangs admin 29K Aug 5 10:40 info.plist
drwxr-xr-x@ 174 devangs admin 5.4K May 3 13:17 node_modules
-rw-r--r--@ 1 devangs admin 2.1K May 3 13:17 package.json
drwxr-xr-x@ 9 devangs admin 288B May 3 13:17 src
from alfred-jetbrains.
just a small note, I think adding a double quotation to the command /bin/sh -c "which phpstorm"
might fix the issue. as running the command without them will fail.
you can try it on the terminal, mine is zsh
+ ohmyzsh
.
Everything used to work before but not sure why this happened recently. I noticed it after the security update which Apple has released recently btw.
from alfred-jetbrains.
Agree, it worked fine for a while. Not sure what broke the change. My env is zsh
+ ohmyzsh
. Do you mind specifying where do I need to make the change?
from alfred-jetbrains.
I didn't edit anything to be honest, I just tried the command from my terminal, but I guess this line should be changed
alfred-jetbrains/src/product.js
Line 82 in 7dcf234
execa.shellSync(`which ${bin}`)
to
execa.shellSync(`"which ${bin}"`)
again, I didn't test it, and I might be wrong but I thought to share my 2cent here.
from alfred-jetbrains.
Did not work, I get a different error
Error: Command failed: /bin/sh -c "which idea"
/bin/sh: which idea: command not found
at makeError (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:174:9)
at module.exports.sync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:338:15)
at handleShell (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:117:9)
at Function.module.exports.shellSync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:361:43)
at getApplicationPath (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/product.js:82:24)
at Object.get (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/product.js:118:31)
at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:7:38)
from alfred-jetbrains.
Can you try to execute the following commands from the terminal and provide the results
which idea
and
/bin/sh -c "which idea"
Also, have you installed the application via the toolbox or as a standalone?
If you are using the standalone version, have you update it recently? If so, did you recreate the binary or not? as from past experience, if you are using the standalone and you upgraded it, you will need to recreate the CLI again.
from alfred-jetbrains.
From command line which idea
works fine.
➜ alfred-jetbrains $ /bin/sh -c "which idea"
/usr/local/bin/idea
➜ alfred-jetbrains $ which idea
/usr/local/bin/idea
➜ alfred-jetbrains $
I am using toolbox to manage my applications. Recently upgraded to IntelliJ 2019.2
from alfred-jetbrains.
sorry man, no idea. hopefully, Brice will find a solution for it soon.
from alfred-jetbrains.
@shahdewang can you try this repo: https://github.com/bchatard/issue_48 and let me know the result of the script?
from alfred-jetbrains.
@bchatard this is the result from my end
{ stdout: '/Users/zaher/bin/phpstorm',
stderr: '',
code: 0,
failed: false,
signal: null,
cmd: '/bin/sh -c which phpstorm',
timedOut: false }
but I do have the same issue when I try to use the command via alfred4, it used to work.
My env:
- nvm 0.34.0
- node v11.15.0
- npm 6.10.2
- macOs 10.14.6
from alfred-jetbrains.
@linuxjuggler
ok simple script works well.
which version of the workflow did you use?
from alfred-jetbrains.
Should be 1.0.12
from alfred-jetbrains.
I checked out and installed the issue_48
repo, and here's my output (changed phpstorm to idea) -
➜ issue_48 git:(master) ✗ $ node index.js
{
stdout: '/usr/local/bin/idea',
stderr: '',
code: 0,
failed: false,
signal: null,
cmd: '/bin/sh -c which idea',
timedOut: false
}
from alfred-jetbrains.
ok thanks.
Actually no idea to workaround this issue :(
Maybe related to issue with Alfred4
Can you try to remove the workflow completely?
As you have an issue with Alfred4 you to do some manual task:
- In Alfred, delete workflow
- Via your terminal, go to this folder:
/usr/local/lib/node_modules/@bchatard/alfred-jetbrains
- Edit
package.json
, and remove the following part:
- "preuninstall": "alfy-cleanup",
- Uninstall my workflow:
npm uninstall -g @bchatard/alfred-jetbrains
- Try to use attached workflow
from alfred-jetbrains.
I followed the steps, had some issues when uninstalling alfred-jetbrains. I unzipped the attached workflow and installed it. However, still get an error -
Error: Command failed: /bin/sh -c which idea
internal/modules/cjs/loader.js:628
throw err;
^
Error: Cannot find module '../'
Require stack:
- /Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/.bin/which
at Object.<anonymous> (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/.bin/which:2:13)
at Function.Module.runMain (internal/modules/cjs/loader.js:840:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/.bin/which'
]
}
at makeError (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/execa/index.js:174:9)
at module.exports.sync (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/execa/index.js:338:15)
at handleShell (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/execa/index.js:117:9)
at Function.module.exports.shellSync (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/execa/index.js:361:43)
at getApplicationPath (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/src/product.js:82:24)
at Object.get (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/src/product.js:118:31)
at Object.<anonymous> (/Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/src/index.js:15:38)
from alfred-jetbrains.
ok, I start to understand something (yes I'm slow :D)
Can you list content of this folder:
ls -hAl /Users/devangs/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.32F68A08-AC8E-4C21-9DA0-72DF35D309D7/node_modules/which/*
from alfred-jetbrains.
@bchatard I don't think the directory you are referring to is something we will have on our end,
for example this is what I have:
total 0
lrwxr-xr-x 1 zaher staff 84 Jun 18 17:04 @bchatard-alfred-jetbrains -> /Users/zaher/.nvm/versions/node/v11.15.0/lib/node_modules/@bchatard/alfred-jetbrains
lrwxr-xr-x 1 zaher staff 74 Jun 18 17:06 alfred-packagist -> /Users/zaher/.nvm/versions/node/v11.15.0/lib/node_modules/alfred-packagist
lrwxr-xr-x 1 zaher staff 72 Jun 18 17:04 alfred-updater -> /Users/zaher/.nvm/versions/node/v11.15.0/lib/node_modules/alfred-updater
drwxr-xr-x@ 23 zaher staff 736 Aug 8 11:32 user.workflow.0467e292-c285-4b0b-a225-65b12778cf48
drwxr-xr-x@ 10 zaher staff 320 Aug 8 11:30 user.workflow.0976030A-2D20-407A-A92D-B96B4EFE740C
drwxr-xr-x@ 37 zaher staff 1184 Jul 3 16:54 user.workflow.1194994C-92D8-420A-90F1-9034BF789D04
drwxr-xr-x@ 25 zaher staff 800 Aug 8 11:37 user.workflow.1a619a94-9408-45d4-a850-0f5f4807bd18
drwxr-xr-x@ 5 zaher staff 160 Aug 8 11:37 user.workflow.255623E4-1624-4718-A6FF-B53195206B7E
drwxr-xr-x@ 8 zaher staff 256 Aug 8 11:29 user.workflow.2D9C22F9-B900-412F-97F7-E6320D133721
drwxr-xr-x@ 8 zaher staff 256 Aug 8 11:30 user.workflow.2FD73730-B0F4-4FE2-BC3F-F7A5DE01B1E0
drwxr-xr-x@ 6 zaher staff 192 Aug 8 11:37 user.workflow.3A0762FE-0289-4DB7-920F-AE7EAB4C5568
drwxr-xr-x@ 12 zaher staff 384 Aug 8 11:30 user.workflow.3A231592-35FA-42A1-827B-83F23CD8C9F0
drwxr-xr-x@ 5 zaher staff 160 Jun 14 01:41 user.workflow.3BF3A265-6E14-427F-997A-401BE6FD3110
drwxr-xr-x@ 5 zaher staff 160 Jun 14 01:40 user.workflow.3C59C8D5-9B21-4538-A9AF-D84AA230503A
drwxr-xr-x@ 6 zaher staff 192 Jun 18 17:11 user.workflow.449230D0-7EC2-40E1-BECC-26D2CE020D6C
drwxr-xr-x@ 6 zaher staff 192 Aug 8 11:37 user.workflow.44CCAA7E-F0D4-4B63-B806-C3177A8B8AFE
drwxr-xr-x@ 5 zaher staff 160 Jun 14 01:40 user.workflow.4C51FE61-BC85-4911-B3BF-6EA001F28E65
drwxr-xr-x@ 18 zaher staff 576 Aug 8 11:33 user.workflow.4ca8872a-cd6b-458d-8e11-96188ec46e50
drwxr-xr-x@ 4 zaher staff 128 Jun 14 01:40 user.workflow.5E136A34-FED0-4FA1-994D-B3C860E355C4
drwxr-xr-x@ 16 zaher staff 512 Aug 8 11:29 user.workflow.5e7e2d9a-d184-412e-b929-c53c733d9adb
drwxr-xr-x@ 12 zaher staff 384 Aug 8 11:30 user.workflow.6353414D-8B40-4383-BA94-DE92F0CC14C5
drwxr-xr-x@ 10 zaher staff 320 Aug 8 11:30 user.workflow.6416E6BB-CE8F-4FEC-BB31-A10297895B58
drwxr-xr-x@ 7 zaher staff 224 Aug 8 11:29 user.workflow.734F5FB3-1009-4725-878B-F9164DC1178D
drwxr-xr-x@ 12 zaher staff 384 Aug 8 11:30 user.workflow.78ED8829-B662-4563-AC29-9BE8B0ECC10A
drwxr-xr-x@ 6 zaher staff 192 Aug 8 11:37 user.workflow.7ca518b9-f498-4d78-99d8-9f6b263a3bc2
drwxr-xr-x@ 13 zaher staff 416 Aug 8 11:37 user.workflow.9e8e4a31-556d-4e68-b0c4-47777d4d8c4e
drwxr-xr-x@ 11 zaher staff 352 Aug 8 11:32 user.workflow.B85F1FFA-1FF5-4AB6-BA83-5B95305B3726
drwxr-xr-x@ 9 zaher staff 288 Aug 8 11:30 user.workflow.C6D04086-E71C-4867-BF07-AE4B81F2402C
drwxr-xr-x@ 6 zaher staff 192 Aug 8 11:30 user.workflow.D114B08F-F425-402F-8487-C22039594B14
drwxr-xr-x@ 14 zaher staff 448 Aug 8 11:34 user.workflow.E024A028-5DBF-4026-99D8-AB633EFBFF84
drwxr-xr-x@ 5 zaher staff 160 Aug 8 11:37 user.workflow.E32876C0-0E43-474F-BDB5-B22FC0EA860F
drwxr-xr-x@ 5 zaher staff 160 Aug 8 11:29 user.workflow.E38FE728-8BE2-454E-AE00-BC1653C71641
drwxr-xr-x@ 14 zaher staff 448 Aug 8 11:29 user.workflow.E768CAF7-3B2B-40E3-9895-658A54570203
drwxr-xr-x@ 6 zaher staff 192 Aug 8 11:37 user.workflow.EA56D641-A421-4BBB-9935-4FCB282ADDA3
drwxr-xr-x@ 25 zaher staff 800 Aug 8 11:37 user.workflow.a91d754c-4803-4009-ad74-5ce311f358be
drwxr-xr-x@ 9 zaher staff 288 Aug 8 11:29 user.workflow.aa13b89e-de50-423c-8147-95a35e923fe2
so you might need to provide us more info so we can help you more
from alfred-jetbrains.
@linuxjuggler this folder is based on answer from @shahdewang with "manual" workflow installation.
In your case (as "normal" installation) it's: /.../Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains/node_modules/which/*
from alfred-jetbrains.
Ok :
➜ @bchatard-alfred-jetbrains git:(3d9c31d) ✗ ls -hAl node_modules/which/*
-rw-r--r--@ 1 zaher staff 2.4K Oct 26 1985 node_modules/which/CHANGELOG.md
-rw-r--r--@ 1 zaher staff 765B Oct 26 1985 node_modules/which/LICENSE
-rw-r--r--@ 1 zaher staff 1.2K Oct 26 1985 node_modules/which/README.md
-rw-r--r--@ 1 zaher staff 1.9K Jun 18 17:04 node_modules/which/package.json
-rw-r--r--@ 1 zaher staff 3.1K Oct 26 1985 node_modules/which/which.js
node_modules/which/bin:
total 8
-rwxr-xr-x@ 1 zaher staff 985B Oct 26 1985 which
"Removed the un-usefull and confusing comment I added"
from alfred-jetbrains.
O_o
the package.json
is not mine
the homepage
field is not correct, there is no @vue/cli
or typescript
dependencies
it's really weird
and there is no git
in this folder when you install package with npm
it's really really weird
can you try a fresh install?
from alfred-jetbrains.
I'll do so and let you know the results.
I just noticed that this is related to nvm, so I you can forget my comment about the modification
from alfred-jetbrains.
Sorry @bchatard for the confusion I did, but now that I deleted the npm package completely (to be honest I used rm
instead of npm
, am not sure why but I got this error when I tried to list the global packages
npm ERR! error in /Users/zaher/.nvm/versions/node/v11.15.0/lib/node_modules/@bchatard/.DS_Store: ENOTDIR: not a directory, open '/Users/zaher/.nvm/versions/node/v11.15.0/lib/node_modules/@bchatard/.DS_Store/package.json'
so I delete the directory completely, and then reinstalled the package again
npm install -g @bchatard/alfred-jetbrains
and now its back working as it should
and here is the result of the command:
alfred-jetbrains git:(3d9c31d) ✗ ls -hAl node_modules/which/*
-rw-r--r--@ 1 zaher staff 2.4K Oct 26 1985 node_modules/which/CHANGELOG.md
-rw-r--r--@ 1 zaher staff 765B Oct 26 1985 node_modules/which/LICENSE
-rw-r--r--@ 1 zaher staff 1.2K Oct 26 1985 node_modules/which/README.md
-rw-r--r-- 1 zaher staff 1.9K Aug 9 10:22 node_modules/which/package.json
-rw-r--r--@ 1 zaher staff 3.1K Oct 26 1985 node_modules/which/which.js
node_modules/which/bin:
total 8
-rwxr-xr-x 1 zaher staff 985B Oct 26 1985 which
which, as you can see, is the same as the above (except the package.json modification date which is related to the installation date).
Not sure why, but deleting the package and reinstall it fixed the issue at my end.
from alfred-jetbrains.
Reinstall worked for me. Yay!!
from alfred-jetbrains.
Related Issues (20)
- can change script location HOT 2
- Unable to find bin for ${product.key}. Search for bin named
- How can I set the right script path to this workflow HOT 1
- pstorm looks to be deprecated in new EAP HOT 27
- Installation not working on Alfred 5 HOT 7
- [Alfred 5]Can't find application path for IntelliJIdea HOT 11
- Can't find application path for IntelliJ IDEA (Ultimate)2023.1.1 HOT 9
- Not finding new IntelliJ projects HOT 22
- A small idea
- Unable to 'Open Pycharm Project' when using 'JetBrains Toolbox' HOT 16
- JetBrains Rider not showing projects HOT 5
- idea 2023,tool box,cannot find the specified directory in the system PATH
- Toolbox v2 HOT 7
- Can't find application path for IntellijIdea. after update toolbox 2.0.2 HOT 4
- The idea command line does not recognize environmental variables. HOT 5
- Unable to save data for workflow HOT 4
- search project bug HOT 3
- Can not change Intellij Idea Edition to Ulimate. HOT 2
- Does not find PhpStorm application HOT 2
- Question about the behavior in toolbox 2: Filter proejct by partial name HOT 4
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 alfred-jetbrains.