bchatard / alfred-jetbrains

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

options.find is not a function #170

Closed tldev closed 3 years ago

tldev commented 4 years ago

Describe the bug Trying to search my projects with mine ha.. and presented with error:

TypeError: options.find is not a function
    at Object.recentProjects (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/paths.js:40:43)
    at Object.getProjectPaths [as get] (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/paths.js:66:43)
    at Object.getItems (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:44:32)
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:19:23
    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:60: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)

- JetBrains - Open Project - v3 1.4.0 Alfred 4.1.1 darwin 19.6.0

To Reproduce

Not sure how to reproduce. I tried reinstalling the plugin and it still happens. However, it was working for a time.

Additional context I manually renamed the rubymine bin from rubymine to mine to match the old bin style

freekmurze commented 4 years ago

Just upgraded to 1.4.1 and this issue seems to still be present.

rymek commented 3 years ago

Same problem here, using IntelliJ Ultimate though

TypeError: options.find is not a function
    at Object.recentProjects (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/paths.js:40:43)
    at Object.getProjectPaths [as get] (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project/paths.js:66:43)
    at Object.getItems (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/project.js:44:32)
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:19:23
    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/src/index.js:60: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)

- JetBrains - Open Project - v3 1.4.1 Alfred 4.2.1 darwin 20.2.0

DieterHolvoet commented 3 years ago

Same issue here, running PhpStorm 2020.3 RC (Build #PS-203.5981.118, built on November 26, 2020).

bchatard commented 3 years ago

Please bump to version 1.4.2

tldev commented 3 years ago

Thanks @bchatard - works like a charm

freekmurze commented 3 years ago

Thank you so much @bchatard! Works again! 👍

image
klassm commented 3 years ago

Maybe I am the only one, but for me it still does not work. It is looking better though. However

option["@_name"] === "additionalInfo";

won't return anything for me. Object.keys(option) gives me [0,1] and Object.values(option) returns [ { '@_name': 'additionalInfo', map: { entry: [Array] } }, { '@_name': 'lastProjectLocation', '@_value': '$USER_HOME$/IdeaProjects/...' } ]

╰─$ node -v v14.10.0

My temporary workaround: paths.js adapted with

 60         // 2020.3+
 61         const entries = options.map(option => option[0]).find((option) => {
 62           return option["@_name"] === "additionalInfo";
 63         });

The [0] makes it work for me.

@bchatard could you please have another look. Thanks :-)

bchatard commented 3 years ago

@klassm please take a look on 1.4.4

klassm commented 3 years ago

Yes that works. Thank you so much @bchatard !