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

Does not work well without Admin perms #174

Closed
osher opened this issue Oct 13, 2016 · 15 comments
Closed

Does not work well without Admin perms #174

osher opened this issue Oct 13, 2016 · 15 comments

Comments

@osher
Copy link
Contributor

osher commented Oct 13, 2016

If I'm already here, then lets report this one too...

I could not use nodist on the corporate machine, on which I have no admin privileges.

I did get one of our IT-Ops to install it for me, and I tried to use it - but I got weird indecisive behaviors every time I used node and every time I tried to change versions.

using NPM left a trail of [ \ - / | \ - / .... ] consuming all my shell buffer
Changing versions did not really work
also changing npm versions did not behave as expected as well.

Using it on a machine logged as a user with proper admin perms works as expected.

Obviously it's about perms...

Any advise?
Is there a way I can show my Ops manager how to install Nodist to work for developers without asking to give them admin perms?

@marcelklehr
Copy link
Member

Mmmh. The problem is probably the default install path in C:\Program Files, installing somewhere else (where no admin permissions are required for writing files) might work. Will check on my machine. Thanks for reporting!

@marcelklehr
Copy link
Member

I cannot reproduce this, weirdly. Can you provide steps to reproduce and windows version, please? Enabling nodist debug output via set DEBUG=nodist:* can also help clear up issues. :/

@mrchief
Copy link

mrchief commented Oct 20, 2016

I have the same issue. Nodist doesn't change the node version no matter which prompt is used. I do have admin rights on the box.

image

Engines in my package.json:

  "engines": {
    "node": ">=4.5.0",
    "npm": ">=3"
  },

@mrchief
Copy link

mrchief commented Oct 20, 2016

Using nvm-windows seems to work (note how it asks for elevation on regular prompt):

image

image

On admin prompt:

image

@marcelklehr
Copy link
Member

When having set DEBUG=nodist:*, running node should give you debug output as well. This probably means, you're not actually running nodist's node.exe. Please check your PATH and make sure there is no other directory with a node.exe there (also don't put path\to\nodist in your PATH; it's gotta be path\to\nodist\bin!)

@mrchief
Copy link

mrchief commented Oct 20, 2016

That could be it. But shouldn't the installer take care of that?

@marcelklehr
Copy link
Member

marcelklehr commented Oct 20, 2016

The installer should put path\to\nodist\bin in your PATH. The system PATH, iirc. It doesn't remove anything from it and doesn't check whether running node executes the right binary. Something obviously has gone wrong for you though and I'd really like to find out what. Can you check your PATH? (Something that should be obvious, but isn't from the docs: Installing nvm-windows after nodist breaks nodist. There can only be one.)

@mrchief
Copy link

mrchief commented Oct 21, 2016

Well I don't have nodist installed anymore (sorry!). But all of those screenshots are from before I installed nvm.

My current path looks like this:

C:\Users\mrchief\AppData\Local\Programs\Python\Python35-32\Scripts\;C:\Users\mrchief\AppData\Local\Programs\Python\Python35-32\;C:\Users\mrchief\.dnx\bin;C:\Ruby22-x64\bin;C:\Program Files (x86)\MSBuild\14.0\Bin;C:\Program Files (x86)\WiX Toolset v3.9\bin;C:\git-tfs;d:\src\tools;C:\Users\mrchief\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\Sublime Text 3;C:\Program Files\Docker Toolbox;F:\PortableApps\nginx-1.8.0;F:\PortableApps\Packer;%NVM_HOME%;%NVM_SYMLINK%

Obviously, the NVMxxx got added after I installed nvm.

@marcelklehr
Copy link
Member

marcelklehr commented Oct 22, 2016

@osher Can you confirm DEBUG=nodist:* not producing any output when running node? In that case the output of node -e "console.log(process.execPath)" would be interesting.

@osher
Copy link
Contributor Author

osher commented Oct 23, 2016

I had to tweak my path so I could work, mind you, so my machine is by definition not typical.
I'm waiting for the next stable release to re-install in a custom place (not in Program Files)
(because of corp procedures I have to get devops to do that, so I'd like to minimize messing with the system, I already "consumed my credit" for the rest of the year... 😛 )

@osher
Copy link
Contributor Author

osher commented Oct 23, 2016

Mmm. mind you that updating the System PATH requires admin perms as well.

@jetersen
Copy link

jetersen commented Dec 1, 2016

when switching node version in non elevated prompt the prefix is set to C:\tools\Nodist\v-x64\7.2.0
When in an elevated prompt prefix is set to C:\tools\Nodist\bin

Very annoying

@marcelklehr
Copy link
Member

@Casz Hi. Which prefix are you talking about? NODIST_PREFIX? Or the prefix of the output of node -e "console.log(process.execPath)"? Or something else?

@jetersen
Copy link

jetersen commented Dec 1, 2016

npm config get prefix
The global bin

@marcelklehr
Copy link
Member

Ahh, interesting. Can you fix it by setting npm config set prefix "%NODIST_PREFIX%\bin" in non-elevated prompt? Also, @Casz do you experience the same issue with nodist not actually changing the node version, as @mrchief described?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants