[GH-ISSUE #88] --user doesn't put config files in the right place? #67

Closed
opened 2026-02-26 05:31:14 +03:00 by kerem · 4 comments
Owner

Originally created by @Meekohi on GitHub (Aug 7, 2013).
Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/88

On my system I have to install global packages with sudo, but

sudo npm install -g log.io --user 'michael'

still installs config files in /root/.log.io/ instead of ~michael/.logio/

Originally created by @Meekohi on GitHub (Aug 7, 2013). Original GitHub issue: https://github.com/NarrativeScience-old/log.io/issues/88 On my system I have to install global packages with sudo, but `sudo npm install -g log.io --user 'michael'` still installs config files in `/root/.log.io/` instead of `~michael/.logio/`
kerem closed this issue 2026-02-26 05:31:14 +03:00
Author
Owner

@bnair commented on GitHub (Jan 28, 2014):

I'm having the same issue. I can't find any npm documentation that states --user is an npm flag. Should it be handled by the cakefile?

<!-- gh-comment-id:33472241 --> @bnair commented on GitHub (Jan 28, 2014): I'm having the same issue. I can't find any npm documentation that states --user is an npm flag. Should it be handled by the cakefile?
Author
Owner

@bnair commented on GitHub (Jan 28, 2014):

so I found a workaround. The problem seems to be that environment isn't preserved when sudoing. So this works:

sudo -E npm install -g log.io --user 'vagrant'

<!-- gh-comment-id:33499581 --> @bnair commented on GitHub (Jan 28, 2014): so I found a workaround. The problem seems to be that environment isn't preserved when sudoing. So this works: sudo -E npm install -g log.io --user 'vagrant'
Author
Owner

@kostajh commented on GitHub (Feb 19, 2014):

+1 for @bnair's solution. Perhaps sudo -E npm install -g log.io --user $USER should be added to the installation instructions?

<!-- gh-comment-id:35517139 --> @kostajh commented on GitHub (Feb 19, 2014): +1 for @bnair's solution. Perhaps `sudo -E npm install -g log.io --user $USER` should be added to the installation instructions?
Author
Owner

@msmathers commented on GitHub (Aug 1, 2014):

I'm unable to reproduce this using node v0.10.29 and npm v1.4.23. No -E flag is necessary with the latest versions of each.

<!-- gh-comment-id:50853910 --> @msmathers commented on GitHub (Aug 1, 2014): I'm unable to reproduce this using node v0.10.29 and npm v1.4.23. No `-E` flag is necessary with the latest versions of each.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/log.io-NarrativeScience-old#67
No description provided.