bchatard / alfred-jetbrains

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

Error: Can't find product, missing key #69

Closed AdamBD closed 5 years ago

AdamBD commented 5 years ago

Describe the bug Hi,

I updated versions following this issue: https://github.com/bchatard/alfred-jetbrains/issues/59

and now run into the following new one:

Error: Can't find product, missing key
    at getProduct (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/product.js:26:9)
    at Object.get (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/product.js:132:17)
    at __dirname (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:15:38)
    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:61:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/esm/esm.js:1:251206)
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/esm/esm.js:1:245054
    at Generator.next (<anonymous>)
    at bl (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/esm/esm.js:1:245412)
    at kl (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/esm/esm.js:1:247659)
    at Object.u (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/esm/esm.js:1:287740)
Q A
Workflow version 1.1.4
OSX Version 10.14.4
Alfred Version 4.0.4
JetBrains Product/Version _PhpStorm / 2019.2.2
Installation type JB Toolbox_
Node version 9.2.0
NPM version 5.5.1_
bchatard commented 5 years ago

hi @AdamBD

did you create a customisation file for preferences or bin name?

AdamBD commented 5 years ago

Hi /usr/local/bin$ ll | grep "pstorm" rwxr--r-- ABD staff 3 KiB Thu Oct 17 13:49:27 2019  pstorm

I have a script in /usr/local/bin registered as pstorm, which calls to the location of where PHPstorm is under the JetBrains tool box in the /Applications folder.

Then in the Toolbox I set this path

image

Is this the correct way to do it?

bchatard commented 5 years ago

Hi,

On tool box settings the shell scripts location should be /usr/local/bin, and in PhpStorm settings only pstorm (or phpstorm)

image image

But the issue seems to be before the check of the shell script.

Can you check your workflow, on Alfred, the PhpStorm "box" should be like this:

image
AdamBD commented 5 years ago

Hi,

I've made the changes you suggested and checked the alfred config for the pstorm node. All looks as in your screenshots. Now when I try running the workflow I get the following new error:

TypeError: util.getSystemErrorName is not a function
    at getCode (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/lib/error.js:11:16)
    at makeError (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/lib/error.js:50:35)
    at Function.module.exports.sync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:187:17)
    at Function.module.exports.commandSync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:224:15)
    at Object.viaWorkspaceXml (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/name.js:57:30)
    at Object.getProductName [as get] (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/name.js:88:43)
    at buildItem (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:7:28)
    at paths.forEach.path (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:40:20)
    at Array.forEach (<anonymous>)
    at Object.getItems (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:39:11)

- JetBrains - Open Project - v3 1.1.4 Alfred 4.0.5 darwin 18.5.0

bchatard commented 5 years ago

@AdamBD

can you try to uninstall / install again the workflow, please?

AdamBD commented 5 years ago

@bchatard sure thing. Did so just now:

TypeError: util.getSystemErrorName is not a function
    at getCode (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/lib/error.js:11:16)
    at makeError (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/lib/error.js:50:35)
    at Function.module.exports.sync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:187:17)
    at Function.module.exports.commandSync (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:224:15)
    at Object.viaWorkspaceXml (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/name.js:57:30)
    at Object.getProductName [as get] (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/name.js:88:43)
    at buildItem (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:7:28)
    at paths.forEach.path (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:40:20)
    at Array.forEach (<anonymous>)
    at Object.getItems (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:39:11)

JetBrains - Open Project - v3 1.1.4
Alfred 4.0.5
darwin 18.5.0

Same issue im afraid. Looks like I may just have to drop it at this point.

bchatard commented 5 years ago

can you check your node version please?

AdamBD commented 5 years ago

Node: v9.2.0

bchatard commented 5 years ago

@AdamBD

ok it's seems that your node version is not compatible with execa because of missing function in node 9.2.0... (see https://github.com/sindresorhus/execa/issues/318) The function has been added in 9.7.0 and backported in 8.12.x but not in previous 9.x...

Can you upgrade to at least node 9.7? Or maybe latest LTS version?

If it's solve your issue I will update the documentation and tests about the version

AdamBD commented 5 years ago

That did it!

Works perfectly now. Really awesome workflow BTW. Makes development such a pleasure with PHPstorm

bchatard commented 5 years ago

@AdamBD thanks for your feedback!