bikenik / alfred-anki

Create New Cards into any decks with any "Note Type".
MIT License
45 stars 1 forks source link

problem with Installation #6

Closed KsanaE-0 closed 5 years ago

KsanaE-0 commented 5 years ago

Hi Bikenik, thank you for developing this amazing alfred workflow. I can't wait to use it to create cards. Unfortunately, I came up with trouble with installation of it. I would be grateful it you can help me out or give me a pointer. Thank you!


simon@mac:~$ --> npm -v
6.12.0
simon@mac:~$ --> node -v
v10.16.3
simon@mac:~$ --> sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A583
simon@mac:~$ --> sudo npm install --global alfred-anki
Password:

> alfred-anki@1.3.1 postinstall /usr/local/lib/node_modules/alfred-anki
> alfy-init

{ Error: Command failed with exit code 1 (EPERM): alfred-link
    at makeError (/usr/local/lib/node_modules/alfred-anki/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/usr/local/lib/node_modules/alfred-anki/node_modules/execa/index.js:112:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  command: 'alfred-link',
  exitCode: 1,
  exitCodeName: 'EPERM',
  stdout: '',
  stderr:
   'Error: Permission denied to read Alfred preferences at location /Users/simon/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n    at module.exports (/usr/local/lib/node_modules/alfred-anki/node_modules/resolve-alfred-prefs/index.js:44:9)',
  all:
   'Error: Permission denied to read Alfred preferences at location /Users/simonn/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n    at module.exports (/usr/local/lib/node_modules/alfred-anki/node_modules/resolve-alfred-prefs/index.js:44:9)',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false,
  signal: undefined }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! alfred-anki@1.3.1 postinstall: `alfy-init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alfred-anki@1.3.1 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/simon/.npm/_logs/2019-10-13T11_56_36_791Z-debug.log

image

KsanaE-0 commented 5 years ago

I've solve this problem by following instructions of this page → Resolving EACCES permissions errors when installing packages globally.

xxx@mac:~/.npm-global/lib/node_modules$ --> npm install --global alfred-anki

> alfred-anki@1.3.1 postinstall /Users/xxx/.npm-global/lib/node_modules/alfred-anki
> alfy-init

+ alfred-anki@1.3.1
added 258 packages from 395 contributors and updated 3 packages in 10.502s

The Installation went smoothly, however this workflow still didn't work on my machine.

Doesn't Anyone have some Ideas?

image

image

bikenik commented 5 years ago

Please, try this release and install as anki.alfredworkflow

KsanaE-0 commented 5 years ago

It works! Thank you very much!