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

Install from NPM failed #7

Closed
geekbleek opened this issue Sep 6, 2016 · 4 comments
Closed

Install from NPM failed #7

geekbleek opened this issue Sep 6, 2016 · 4 comments

Comments

@geekbleek
Copy link

Not sure if this is an issue with the alfred-link package, but it fails to find my user's Alfred preference files when install run as "sudo". However, on OS X to install packages globally, you must run as "sudo".
Here is the original NPM error:

[Error: Alfred preferences not found at location /Users/username/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist]
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "https://github.com/sindresorhus/alfred-npms.git"
npm ERR! node v5.7.0
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE

npm ERR! alfred-npms@0.3.0 postinstall: alfred-link
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the alfred-npms@0.3.0 postinstall script 'alfred-link'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the alfred-npms package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! alfred-link
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs alfred-npms
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls alfred-npms
npm ERR! There is likely additional logging output above.

I confirmed the preferences plist is there at the path referenced above. I cloned the repo into the global folder at /usr/local/lib/node_modules and then did removed the post install script command, and did the "npm install -g" as sudo. Then I could manually run "alfred-link" in the directory (I had installed alfred-link globally via npm first).

@kevva
Copy link

kevva commented Sep 6, 2016

However, on OS X to install packages globally, you must run as "sudo"

This is not true, and I strongly recommend against doing it. Follow this guide instead https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md.

@SamVerschueren
Copy link
Contributor

@kevva Lol, was just linking that one as well :).

It's still odd that it doesn't find the location although confirmed by the user, it is present.

@kevva
Copy link

kevva commented Sep 6, 2016

Only thing I can think of is some weird permission error, but I'd expect it to throw EPERM then. I'd still recommend to follow the link I posted and then trying again.

And yes, I always have that link ready :D.

@SamVerschueren
Copy link
Contributor

Closing this in favour of SamVerschueren/alfred-link#8 as it is an issue with alfred-link.

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

3 participants