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

Does not install correctly #21

Open
alexreg opened this issue Oct 11, 2020 · 8 comments
Open

Does not install correctly #21

alexreg opened this issue Oct 11, 2020 · 8 comments

Comments

@alexreg
Copy link

alexreg commented Oct 11, 2020

The workflow does not get installed to Alfred (Alfred 4).

Here is the output of the npm install command.

npm WARN deprecated [email protected]: This is not needed anymore. Use `require('os').homedir()` instead.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> @alexlafroscia/[email protected] postinstall /Users/alex/.npm-packages/lib/node_modules/@alexlafroscia/tldr-alfred-workflow
> alfy-init

+ @alexlafroscia/[email protected]
added 296 packages from 161 contributors in 12.597s

Any ideas?

@alexlafroscia
Copy link
Owner

Sorry this has taken so long for me to get back to!

It doesn't seem like there's an error in there, per say -- what seems to go wrong?

Can you provide some context on how you installed it, how you have Node installed, etc.?

@alexlafroscia
Copy link
Owner

alexlafroscia commented Nov 4, 2020

I tried to install using

yarn global add @alexlafroscia/tldr-alfred-workflow

and got this error

[1/4] 🔍  Resolving packages...
warning @alexlafroscia/tldr-alfred-workflow > tldr > [email protected]: This is not needed anymore. Use `require('os').homedir()` instead.
warning @alexlafroscia/tldr-alfred-workflow > tldr > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @alexlafroscia/tldr-alfred-workflow > tldr > request > [email protected]: this library is no longer supported
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /Users/alafroscia/.volta/tmp/.tmp962EOo/lib/node_modules/@alexlafroscia/tldr-alfred-workflow: Command failed.
Exit code: 1
Command: alfy-init
Arguments:
Directory: /Users/alafroscia/.volta/tmp/.tmp962EOo/lib/node_modules/@alexlafroscia/tldr-alfred-workflow
Output:
Error: Command failed: alfred-link
Error: Alfred preferences not found at location /Users/alafroscia/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist
    at /Users/alafroscia/.volta/tmp/.tmp962EOo/lib/node_modules/resolve-alfred-prefs/index.js:15:10


    at /Users/alafroscia/.volta/tmp/.tmp962EOo/lib/node_modules/execa/index.js:236:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 1,
  killed: false,
  stdout: '',
  stderr: 'Error: Alfred preferences not found at location /Users/alafroscia/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n' +
    '    at /Users/alafroscia/.volta/tmp/.tmp962EOo/lib/node_modules/resolve-alfred-prefs/index.js:15:10\n',
  failed: true,
  signal: null,
  cmd: 'alfred-link',
  timedOut: false
}
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Is that what you're seeing too? It seems like maybe the issue is searching for the Alfred 3 preferences?

@alexlafroscia
Copy link
Owner

I upgraded alfy to the latest version but it still fails...

@alexreg
Copy link
Author

alexreg commented Nov 7, 2020

@alexlafroscia No worries. What I'm trying is installing to a custom user-local prefix. I do this because I have a brewdo installation of Homebrew, which is not user local, and thus something user-local (as Alfred Workflows are) made a lot more sense, at least for my setup. Funnily enough, everything just worked this time! (I did uninstall the previous version first, but other than that, nothing different.)

$ NPM_CONFIG_PREFIX=~/.npm-packages/ npm install -g @alexlafroscia/tldr-alfred-workflow

npm WARN deprecated [email protected]: This is not needed anymore. Use `require('os').homedir()` instead.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 316 packages, and audited 316 packages in 7s

Does that work for you too? Maybe it should be the recommended installation method, if so.

@alexlafroscia
Copy link
Owner

I tried the installation again; oddly enough, the install "worked" (as in no npm error) but the workflow wasn't actually added to Alfred...

@alexreg
Copy link
Author

alexreg commented Dec 15, 2020

Yeah, that was exactly what happened for me initially.

@alexlafroscia
Copy link
Owner

So weird! What was the actual fix? The NPM_CONFIG_PREFIX option?

@alexreg
Copy link
Author

alexreg commented Dec 17, 2020

Yeah, I think so. Though NPM had probably upgraded between the two occasions on which I tried this, so perhaps something changed behind the scenes! Or maybe Alfred did. I honestly don't know for sure. Weird, as you say. Thanks for looking into it anyway.

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

No branches or pull requests

2 participants