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

Edit npm update command, edit Dropbox/ location #426

Closed
wants to merge 6 commits into from
Closed

Edit npm update command, edit Dropbox/ location #426

wants to merge 6 commits into from

Conversation

zackphilipps
Copy link

The new way to update npm is npm install npm -g, as already indicated here #423.

In addition, I don't know how everyone else is doing this without getting errors from npm. In my experience I've always had to run npm updates by typing sudo beforehand. I think this should be incorporated.

Also, adding Dropbox to the Documents folder must be the old way it was done... When I installed Dropbox it was added to my home folder.

Otherwise, I absolutely love these dotfiles to death... \m/

@Rowno
Copy link

Rowno commented Oct 1, 2014

This is how I install global packages without sudo: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo-linux.md

@zackphilipps
Copy link
Author

Thanks.

Zack Philipps
Web Developer at Tribeswell, LLC http://www.tribeswell.com/
zack@tribeswell.com
812.797.9545

@zackphilipps
Copy link
Author

I still think sudo should be there by default. The goal is to save time.

@webpro
Copy link
Contributor

webpro commented Oct 1, 2014

@zackphilipps No, using sudo should not be the default:

Installing node as a root user means that installing npm, and npm packages also requires the use of sudo. So, you’ll be installing 3rd party libraries of code that have root access to your entire filesystem. But, you’re reading all of the source code for the libraries you use, right? Right.

@zackphilipps
Copy link
Author

That makes sense. I installed with Homebrew and I can't get @Rowno's instructions to work. I updated my pull request though.

@hkdobrev
Copy link
Contributor

hkdobrev commented Oct 1, 2014

@zackphilipps I agree with @Rowno and @webpro. I install everything I can without sudo and prefer the program to ask me when elevated privileges are needed for a specific thing.

@zackphilipps
Copy link
Author

I've been convinced, lol. The pull request is changed. 

@hkdobrev
Copy link
Contributor

hkdobrev commented Oct 1, 2014

@zackphilipps Sorry, didn't see that! I welcome the unified install/update mechanism for npm. Do you think you'd be able to change the PR to contain only this change? It seems it contain other changes from your fork perhaps.

@zackphilipps
Copy link
Author

Should I make a separate PR for the Dropbox thing? Because I think it's needed. 

@zackphilipps
Copy link
Author

Also, this might be a stupid question, but is using sudo for aptitude any different than using sudo for npm? I'm just confused as to why it seems like npm is the only package manager people are worried about.

@hkdobrev
Copy link
Contributor

hkdobrev commented Oct 2, 2014

@zackphilipps I am also updating gems and brew formulae without sudo and I am currently not using aptitude, but I have seen methods to use it with less sudo.

@zackphilipps
Copy link
Author

I see. Well I guess this conversation has already been had, and people made the decision to remove sudo from npm and leave it for gems in this dotfile, so I must be spinnin' wheels. But, I learned a little. Thanks for the info guys! I think for now I am just going to take the risk and add sudo to the npm parts on my local copy so I can use the update alias.

Btw I fixed the merge conflicts.

@zackphilipps zackphilipps changed the title Add sudo to npm updates, edit npm update command Edit npm update command, edit Dropbox/ location Oct 2, 2014
swinstanley pushed a commit to swinstanley/dotfiles that referenced this pull request May 25, 2015
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

Successfully merging this pull request may close these issues.

None yet

5 participants