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

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

Closed
AdamBD opened this issue Oct 7, 2019 · 11 comments
Closed

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

AdamBD opened this issue Oct 7, 2019 · 11 comments
Assignees

Comments

@AdamBD
Copy link

AdamBD commented Oct 7, 2019

Describe the bug
Hi,

I updated versions following this issue: #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
Copy link
Owner

bchatard commented Oct 7, 2019

hi @AdamBD

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

@AdamBD
Copy link
Author

AdamBD commented Oct 17, 2019

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
Copy link
Owner

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
Copy link
Author

AdamBD commented Oct 21, 2019

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
Copy link
Owner

@AdamBD

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

@AdamBD
Copy link
Author

AdamBD commented Oct 24, 2019

@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
Copy link
Owner

can you check your node version please?

@AdamBD
Copy link
Author

AdamBD commented Oct 26, 2019

Node: v9.2.0

@bchatard
Copy link
Owner

@AdamBD

ok it's seems that your node version is not compatible with execa because of missing function in node 9.2.0... (see sindresorhus/execa#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
Copy link
Author

AdamBD commented Oct 31, 2019

That did it!

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

@bchatard
Copy link
Owner

@AdamBD thanks for your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants