alfred-slack-status icon indicating copy to clipboard operation
alfred-slack-status copied to clipboard

npm install fails when Alfred preferences aren’t in the default location

Open aaronk6 opened this issue 7 years ago • 0 comments

My Alfred preferences are shared across multiple users (using Alfred’s syncing feature), and are therefore stored in /Users/Shared/Library/Application Support/Alfred 3. However, this could also be any other location, e.g. Dropbox.

npm i -g alfred-slack-status                                       ⏎

> [email protected] postinstall /usr/local/lib/node_modules/alfred-slack-status
> alfy-init

{ Error: Command failed: alfred-link
Error: Alfred preferences not found at location /Users/aaron/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist
    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-slack-status/node_modules/resolve-alfred-prefs/index.js:15:10)
    at <anonymous>

    at Promise.all.then.arr (/usr/local/lib/node_modules/alfred-slack-status/node_modules/execa/index.js:201:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 1,
  killed: false,
  stdout: '',
  stderr: 'Error: Alfred preferences not found at location /Users/aaron/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-slack-status/node_modules/resolve-alfred-prefs/index.js:15:10)\n    at <anonymous>\n',
  failed: true,
  signal: null,
  cmd: 'alfred-link',
  timedOut: false }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `alfy-init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aaron/.npm/_logs/2018-02-01T12_14_04_834Z-debug.log
```

aaronk6 avatar Feb 01 '18 12:02 aaronk6