-
Notifications
You must be signed in to change notification settings - Fork 31
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
Installation: It might be better to use nvm #55
Comments
@gabrielschulhof I absolutely agree with you. I think it would be better to found the hole development of the There is a basic problem with using NVM: The @Frijol I think we should add some notes about skill requirements if a |
related to #57 |
I don't think it's a good idea to recommend nvm, it's simply not our place to decide what the end user should use and it actually places more responsibility on us if we start doing that. I use the system installed Node.js and it works perfectly fine. I think that the real problem here is how packages are handled on Linux. Global installations simply require root, that's a design decision and not a bug. I believe the correct way to solve this is to run |
@LinusU 👍 Yes, the more no sudo the best. Could you explain why this isn't possible for Linux - would it be possible to install the |
The only reason is because I don't know if npm has a way to install globally per user (e.g. to |
@LinusU is there no easy way to provide the ability to require each user to install That way it would not confuse people going the basic standard way but also provides more information about what is possible and what isn't. About changing NPM you are absolutely right - that is no option. |
I think adding |
@johnnyman727 I agree, also, people are used to running package managers as root (e.g. |
+1 |
-1 The reason is, root permissions are only necessary for node apps what will use low port numbers same as system services. |
@Student007 this guide is meant to make getting started with Tessel as easy and fast as possible for as many people as possible. Having too much instruction can be just as much of a cognitive load as too few instructions. I see where you're coming from but I think if advanced users are wary of using root, they probably already know how (or how how to Google) an alternative way. |
@Student007 Using root is only necessary for installing, not for actually running. I would actually argue that this is the correct way of installing, since you want to make the command available to all users of the machine (which most often is only one thought). I don't think that advanced users will think it's weird. I personally would prefer to install things on the personal account, under This is how it works for every other npm distributed command line tool.
I actually meant the other way around, if you really want to be able to install stuff without root than we need to fix it in npm. It's probably already possible by overriding some environmental variables to get npm to install things under your home directory instead. That being said, I don't think that it's up to us to provide those instructions. At the very most we could link to some page somewhere explaining how it could work. But we are really shoehorning here. If you don't want |
|
All good points regarding nvm and installing as a privileged user. I just want to jump in and suggest that one of the compromises we can make if we have to support a Homebrew style writeable /usr/local for global npm support is to make it writable for the "admin" group, but still owned by a privileged user. This is somewhat compliant with both POSIX desires, and the need for things like Homebrew and npm to own things there. This also means you can login as a different user, and as long as that user is a member of admin, it should work for them, as well. I recall Homebrew already does this, but I don't use brew, so someone can correct me if this is not the case. But, like I said, this "should" work. I have not tried it, but I'm not sure how the default umask setting for admin users would play with this. This might be a non-starter without umask changes. In which case, ignore this comment. |
We can't really do anything about it on our end though since that would be up to homebrew? |
It would be up to whatever state /usr/local is in, which is not controllable by anyone here, but is relevant for the purposes of having a start page that works. This is not specific to Homebrew. Homebrew often precipitates the problem, though. If the intention is to have, or suggest in the start page, a writable /usr/local (which looks like the only option for installing t2-cli without nvm, as "sudo" seems to fail miserably) then also recommending group ownership instead of user ownership may be a cleaner workaround. |
@LinusU just reading this now...
That's really compelling, I will use this argument in the future :) |
Just want to note that we'll be covering the topic of updating the installation procedures at the Steering Committee next week (Tuesday). If anyone has any more opinions, add them now! |
relevant: this thread https://twitter.com/ag_dubs/status/750436509946417152 |
I have found that if I use the instructions at
https://github.com/tessel/t2-start/blame/gh-pages/install.md#L35
I end up having permission problems when I subsequently try to
npm install t2-cli
. It might be better to usehttps://github.com/creationix/nvm#install-script
The text was updated successfully, but these errors were encountered: