bchatard / alfred-jetbrains

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

alfred 4 support #22

Closed ZhiliangWu closed 5 years ago

ZhiliangWu commented 5 years ago
Q A
Workflow version 1.0.12
OSX Version 10.14.5
Alfred Version 4.0
JetBrains Product/Version Pycharm / 2019.1
Installation type classic .dmg
Node.js version v10.9.0

Description

$ npm install -g @bchatard/alfred-jetbrains

> @bchatard/alfred-jetbrains@1.0.12 preuninstall /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
> alfy-cleanup

> @bchatard/alfred-jetbrains@1.0.12 postinstall /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
> alfy-init

+ @bchatard/alfred-jetbrains@1.0.12
updated 1 package in 2.42s

Step to reproduce

bchatard commented 5 years ago

Hi,

I just test and everything works fine.

Did you update from Alfred3 or first install?

Can you check if the workflow is installed in Alfred Preferences folder. You can find this folder here image

And then go to the Alfred.alfredpreferences folder and check in workflows folder: image

ZhiliangWu commented 5 years ago

Hi, thanks for the quick reply. I installed Alfred 4 while not deleting the Alfred 3 so as to import settings from it. And then it is deleted. Here is the workflows folder. It seems that the workflow is not there as the time are all very old.

image
kaiyulee commented 5 years ago

Run npm install -g @bchatard/alfred-jetbrains after updated to Alfred 4:

Error: Alfred preferences not found at location /Users/s03g00/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/_resolve-alfred-prefs@1.0.0@resolve-alfred-prefs/index.js:15:10

    at makeError (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/_execa@1.0.0@execa/index.js:174:9)
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/_execa@1.0.0@execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:89:5) {
  code: 1,
  stdout: '',
  stderr: 'Error: Alfred preferences not found at location ' +
    '/Users/s03g00/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
    '    at ' +
    '/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/_resolve-alfred-prefs@1.0.0@resolve-alfred-prefs/index.js:15:10\n',
  failed: true,
  signal: null,
  cmd: 'alfred-link',
  timedOut: false,
  killed: false
}

Is there a way to specify the preferences location ?

bchatard commented 5 years ago

Hi @ZhiliangWu

I follow the same upgrade path to v4. In your screenshot I see alfred-fkill workflow, did it works? Can you try to install another workflow (for eghttps://github.com/sindresorhus/alfred-emoj) and check if it appear in your workflow folder?

bchatard commented 5 years ago

Hi @kaiyulee Did you follow the upgrade wizard in the v4? You can check your preferences folders in Advanced settings (see my screenshots in my previous comment)

ZhiliangWu commented 5 years ago

Yes, it works as it is migrated from the Alfred 3. I think you are right, as the alfred-emoji also failed, which is also installed with npm. In addition, I deleted the alfred-fkill and tried to reinstall it with npm install --global alfred-fkill, it also failed (meaning it also doesn't show in Workflows in Alfred settings). Therefore, I think the problem should be from the npm with alfred 4, rather than from your package. Do you have any clue how to fix the problem?

bchatard commented 5 years ago

@ZhiliangWu

Can you uninstall my workflow and try to re-install it with the following command:

$ npm install -g --loglevel verbose @bchatard/alfred-jetbrains 
bchatard commented 5 years ago

Related issues:

ZhiliangWu commented 5 years ago

Hi, I have run the command, but it doesn't seem to fix the problem. Following is the output information

$ npm install -g --loglevel verbose @bchatard/alfred-jetbrains
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/local/Cellar/node/12.3.1/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '-g',
npm verb cli   '--loglevel',
npm verb cli   'verbose',
npm verb cli   '@bchatard/alfred-jetbrains'
npm verb cli ]
npm info using npm@6.9.0
npm info using node@v12.3.1
npm verb npm-session f01326d65beb1b13
npm http fetch GET 304 https://registry.npmjs.org/@bchatard%2falfred-jetbrains 1095ms (from cache)
npm timing stage:loadCurrentTree Completed in 1436ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 65ms
npm http fetch GET 304 https://registry.npmjs.org/execa 45ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fuse.js 82ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fast-xml-parser 83ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/alfy 1127ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/dot-prop 51ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/clean-stack 55ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/conf 88ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/hook-std 89ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/loud-rejection 93ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/got 94ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/read-pkg-up 96ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/cache-conf 696ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/alfred-notifier 886ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/alfred-link 887ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/del 40ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/plist 62ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-exists 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/sudo-block 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/user-home 67ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pify 70ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/make-dir 74ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/resolve-alfred-prefs 1011ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/globby 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/object-assign 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pinkie-promise 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/rimraf 50ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-path-cwd 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-path-in-cwd 107ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/array-union 43ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/arrify 46ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/glob 125ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/array-uniq 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/inherits 35ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/once 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/inflight 54ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/fs.realpath 57ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/minimatch 70ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-is-absolute 85ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/wrappy 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/brace-expansion 711ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/balanced-match 114ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/concat-map 114ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pinkie 69ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-path-inside 46ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-is-inside 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xmlbuilder 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xmldom 39ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/base64-js 61ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/find-up 29ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/read-pkg 37ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-type 40ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/normalize-package-data 40ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/load-json-file 43ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/graceful-fs 36ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/parse-json 38ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strip-bom 46ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/error-ex 30ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-arrayish 58ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-utf8 28ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/hosted-git-info 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/semver 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/resolve 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/validate-npm-package-license 50ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-parse 49ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/spdx-expression-parse 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/spdx-correct 46ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/spdx-license-ids 39ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/spdx-exceptions 28ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/bplist-parser 28ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/untildify 29ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/big-integer 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/os-homedir 59ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-root 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-docker 51ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/chalk 51ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ansi-styles 39ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/escape-string-regexp 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/has-ansi 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/supports-color 50ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strip-ansi 54ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ansi-regex 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/latest-version 40ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pkg-up 30ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/env-paths 36ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mkdirp 45ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-obj 139ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/minimist 44ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/signal-exit 42ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-stream 44ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strip-eof 44ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/npm-run-path 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-finally 50ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/get-stream 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/cross-spawn 76ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/which 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/lru-cache 43ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/shebang-command 76ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/yallist 36ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pseudomap 53ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/shebang-regex 27ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/isexe 27ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/path-key 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/package-json 56ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/registry-auth-token 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/registry-url 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-redirect 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-retry-allowed 54ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/timed-out 54ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/safe-buffer 57ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/lowercase-keys 60ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/create-error-class 62ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/unzip-response 62ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/url-parse-lax 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/duplexer3 70ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/capture-stack-trace 28ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/prepend-http 28ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/rc 174ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/ini 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strip-json-comments 51ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/deep-extend 83ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/write-file-atomic 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/locate-path 25ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-locate 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-limit 29ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-try 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/imurmurhash 35ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nice-try 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/pump 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/end-of-stream 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/into-stream 55ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/isurl 59ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-timeout 59ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/url-to-options 46ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/cacheable-request 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/mimic-response 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-cancelable 64ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/decompress-response 73ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/@sindresorhus%2fis 179ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/keyv 47ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/normalize-url 48ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/clone-response 53ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/http-cache-semantics 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/responselike 54ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/json-buffer 37ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/sort-keys 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/query-string 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/strict-uri-encode 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/decode-uri-component 39ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-plain-obj 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/from2 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/p-is-promise 35ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/readable-stream 27ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/isarray 34ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/process-nextick-args 39ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/core-util-is 43ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/string_decoder 44ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/util-deprecate 52ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/has-to-string-tag-x 30ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/is-object 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/has-symbol-support-x 29ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/currently-unhandled 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/array-find-index 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/json-parse-better-errors 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nimnjs 36ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/lodash 37ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/configstore 41ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/xdg-basedir 32ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/unique-string 33ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/crypto-random-string 29ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nimn_schema_builder 31ms (from cache)
npm http fetch GET 304 https://registry.npmjs.org/nimn-date-parser 32ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 7636ms
npm timing stage:loadIdealTree Completed in 7755ms
npm timing stage:generateActionsToTake Completed in 19ms
npm verb correctMkdir /Users/zhiliangwu/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /Users/zhiliangwu/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
npm timing action:extract Completed in 24ms
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~preuninstall: @bchatard/alfred-jetbrains@1.0.12

> @bchatard/alfred-jetbrains@1.0.12 preuninstall /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
> alfy-cleanup

npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~preuninstall: unsafe-perm in lifecycle true
npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~preuninstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Users/zhiliangwu/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~preuninstall: CWD: /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~uninstall: @bchatard/alfred-jetbrains@1.0.12
npm verb unbuild rmStuff @bchatard/alfred-jetbrains@1.0.12 from /usr/local/lib/node_modules
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~postuninstall: @bchatard/alfred-jetbrains@1.0.12
npm timing action:unbuild Completed in 219ms
npm timing action:remove Completed in 30ms
npm timing action:finalize Completed in 28ms
npm timing action:refresh-package-json Completed in 10ms
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~preinstall: @bchatard/alfred-jetbrains@1.0.12
npm timing action:preinstall Completed in 1ms
npm info linkStuff @bchatard/alfred-jetbrains@1.0.12
npm timing action:build Completed in 2ms
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~install: @bchatard/alfred-jetbrains@1.0.12
npm timing action:install Completed in 1ms
npm info lifecycle @bchatard/alfred-jetbrains@1.0.12~postinstall: @bchatard/alfred-jetbrains@1.0.12

> @bchatard/alfred-jetbrains@1.0.12 postinstall /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
> alfy-init

npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~postinstall: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Users/zhiliangwu/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
npm verb lifecycle @bchatard/alfred-jetbrains@1.0.12~postinstall: CWD: /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
npm timing action:postinstall Completed in 306ms
npm verb unlock done using /Users/zhiliangwu/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
npm timing stage:executeActions Completed in 631ms
npm timing stage:rollbackFailedOptional Completed in 0ms
npm timing stage:runTopLevelLifecycles Completed in 9845ms
+ @bchatard/alfred-jetbrains@1.0.12
updated 1 package in 9.846s
npm verb exit [ 0, true ]
npm timing npm Completed in 10066ms
npm info ok
LitoMore commented 5 years ago

On another hand, we could export and upload this workflow to http://www.packal.org for Alfred 4 users.

bchatard commented 5 years ago

with this solution you will loose the easy update feature.

The best workaround for now is to change the Alfred Preferences (Advanced -> Set preferences folder...)

tjosinga commented 5 years ago

I had the same problem. And then I tried to install the alfred-updater. That gave me the following error:

Error: Workflow directory `/Users/taco/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows` does not exist
    at resolveAlfredPrefs.then.then.exists (/Users/taco/.nvm/versions/node/v11.14.0/lib/node_modules/alfred-updater/node_modules/alfred-link/index.js:26:11)

Alfred 4 seems to use "Application Support/Alfred", while version 3 used "Application Support/Alfred 3". That folder was indeed missing. So as a workaround, I added a symlink "Alfred 3" in Application Support, directing to the Alfred folder. After this both alfred-updater and alfred-jetbrains installed without any problems.

bchatard commented 5 years ago

Yes it's a know issue on SamVerschueren/resolve-alfred-prefs. A PR is opened

ghost commented 5 years ago

Symlink and changing the syncing path for Alfred settings didn't help

stderr: 'Error: Alfred preferences not found at location ' + '/Users/vlad/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' + ' at ' + '/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/resolve-alfred-prefs/index.js:15:10\n',

Julian-Brendel commented 5 years ago

Had the same issue, for me the npm install -g --loglevel verbose @bchatard/alfred-jetbrains command just installed in the node_global dir and didn't link anything. In my case it was installed into ~/.nvm/versions/node/v8.12.0/lib/node_modules/@bchatard/alfred-jetbrains.

For me, creating a symbolic symlink from the Alfred workflow folder to that location fixed the issue and the workflow showed up and worked without any problems. ln -s ~/.nvm/versions/node/v8.12.0/lib/node_modules/@bchatard/alfred-jetbrains ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/alfred-jetbrains

ghost commented 5 years ago

I still can't it. What is the status of PR?

bchatard commented 5 years ago

Please check the issue on the following dependency: https://github.com/SamVerschueren/resolve-alfred-prefs/issues/7

ghost commented 5 years ago

It looks like he doesn't maintain his resolve-alfred-prefs. It's much simpler to create a fork and accept this PR

LitoMore commented 5 years ago

Sindre Sorhus has write access for that repo, I think he can help us review and merge that PR.

But currently he has lots of issues and PRs to review, so it may take some time.

bchatard commented 5 years ago

@LitoMore thanks for the feedback

@fedor1991 I think we need to fork alfy and resolve-alfred-prefs to create the workaround. I will try to look on it as soon as I can

LitoMore commented 5 years ago

@bchatard No problem. I will push Sindre to review that PR at the same time.

will4j commented 5 years ago

This issue seems to have been shelved.

What I did as workround:

$cd /Users/xxx/Library/Application Support

backup alfred 3‘s dir if necessary: $mv Alfred\ 3 Alfred\ 3-backup

create a soft link to alfred 4 $ln -s Alfred Alfred\ 3

then, try $npm install -g @bchatard/alfred-jetbrains

when this issue is solved, remember to delete the soft link.

sifex commented 5 years ago

This issue seems to have been shelved.

Simplified for others who come across this:

Fix for it not working in Alfred 4 (yet) ln -s $(readlink ~/Library/Application\ Support/Alfred\ 3/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains) ~/Library/Application\ Support/Alfred/Alfred.alfredpreferences/workflows/@bchatard-alfred-jetbrains

haelbichalex commented 5 years ago

https://github.com/SamVerschueren/resolve-alfred-prefs/pull/8 was merged

LitoMore commented 5 years ago

https://github.com/sindresorhus/alfy/pull/111 is on the way :)

bchatard commented 5 years ago

@LitoMore great news! Thanks!

bchatard commented 5 years ago

please update to 1.1.0

shahdewang commented 4 years ago

@bchatard I am still unable to install the plugin. Should I create a new ticket?

➜  ~ $ npm uninstall -g @bchatard/alfred-jetbrains

> @bchatard/alfred-jetbrains@1.0.12 preuninstall /usr/local/lib/node_modules/@bchatard/alfred-jetbrains
> alfy-cleanup

Error: Command failed: alfred-unlink
internal/modules/cjs/loader.js:797
    throw err;
    ^

Error: Cannot find module '.'
Require stack:
- /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink:3:20)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink'
  ]
}

    at makeError (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:174:9)
    at /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  code: 1,
  stdout: '',
  stderr: 'internal/modules/cjs/loader.js:797\n' +
    '    throw err;\n' +
    '    ^\n' +
    '\n' +
    "Error: Cannot find module '.'\n" +
    'Require stack:\n' +
    '- /usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink\n' +
    '    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)\n' +
    '    at Function.Module._load (internal/modules/cjs/loader.js:687:27)\n' +
    '    at Module.require (internal/modules/cjs/loader.js:849:19)\n' +
    '    at require (internal/modules/cjs/helpers.js:74:18)\n' +
    '    at Object.<anonymous> (/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink:3:20)\n' +
    '    at Module._compile (internal/modules/cjs/loader.js:956:30)\n' +
    '    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)\n' +
    '    at Module.load (internal/modules/cjs/loader.js:812:32)\n' +
    '    at Function.Module._load (internal/modules/cjs/loader.js:724:14)\n' +
    '    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {\n' +
    "  code: 'MODULE_NOT_FOUND',\n" +
    '  requireStack: [\n' +
    "    '/usr/local/lib/node_modules/@bchatard/alfred-jetbrains/node_modules/.bin/alfred-unlink'\n" +
    '  ]\n' +
    '}\n',
  failed: true,
  signal: null,
  cmd: 'alfred-unlink',
  timedOut: false,
  killed: false
bchatard commented 4 years ago

@shahdewang

why did you try to uninstall the workflow? try to install directly, it will works since 1.1x