How to set up PATH during Nodist installation in Windows - node.js

During my installation of Nodist, the node version manager for Windows, I encountered an alert message that stated:
PATH not updated, original length 1030 > 1024
The result was that even Nodist was installed successfully(per installation feedback), entering 'nodist' at git bash at directory levels other than its resident directory (C:\Program Files (x86)\Nodist\bin) yielded:
'nodist' is not recognized as an internal or external command,operable program or batch file.
How can one set up PATH manually?

Since nodist can be accessed from the directory of C:\Program Files (x86)\Nodist\bin and not anywhere else, placing the path
C:\Program Files (x86)\Nodist\bin
in the System Variables (accessible from Window's Advanced System Settings/Environmental Variables) corrects the problem. Many thanks to Marcel Klehr for the pointer.

Related

How can I find path of AWS CLI in windows

I have successfully installed aws cli, but I'm getting
"'aws' is not recognized as an internal or external command,
operable program or batch file."
I think it is problem with the path settings. How do I know the path of AWSCLI for windows?
Ideally, it should be configured with the installation.
Please try the following.
On my system for version
The path entry is
C:\Program Files\Amazon\AWSCLIV2\
Check that this path "C:\Program Files\Amazon\AWSCLIV2" exists on your system. If it's nonexistent then search for aws.exe in C:\Program Files. The folder in which aws.exe is present will be your base path. If you don't find the aws.exe do a re-install.
If the path "C:\Program Files\Amazon\AWSCLIV2" exists on your system. Or there is some other folder in which aws.exe is present then that path needs to be configured manually.
Set the path manually. by following steps.
Steps to add this entry in a path environment variable.
Click on windows and search edit environment.
In the System variable section click on the path.
Add the path "C:\Program Files\Amazon\AWSCLIV2"
Save. Open a new command line and type aws.

clasp is not recognized after installing on windows 10

I am trying to use Visual Studio Code as Google Sheets Script editor on a win 10 machine.
To make a long story short I will not describe all my steps, as I didn't really understood at the beginning exactly what I need. I also wouldn't be able to do it even I want to.
The current situation is that clasp is not recognized on the system.
These are command line results:
c:\>where npm
C:\Program Files\nodejs\npm
C:\Program Files\nodejs\npm.cmd
c:\>where clasp
C:\Users\XXX\AppData\Roaming\npm\clasp
C:\Users\XXX\AppData\Roaming\npm\clasp.cmd
on drive c: root (and any folder other than C:\Users\XXX\AppData\Roaming\npm\clasp) clasp is not recognized
c:\>clasp -v
'clasp' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\XXX\AppData\Roaming\npm>clasp -v
2.3.0
One suggestion I found is setting Windows user variable as follows:
SET NODE_PATH=% APPDATA%\npm
Didn't help.
npm related paths on Windows PATH :
C:\Users\XXX\AppData\Roaming\npm
I tried to add to PATH the following file path before the one above
C:\Program Files\nodejs\npm
Didn't help
Based on this post looks like npm is actually installed twice. For current user C:\Users\XXX\AppData\Roaming\npm and for all users C:\Program Files\nodejs\npm.
Maybe this is the problem.
I would like to start over from clean env.
How can I uninstall the local user npm installation on C:\Users\XXX\AppData\Roaming\npm?
You need to add path to npm in environment variables. Then it will work.
Press Ctrl+r
Write %AppData% and hit enter
You will land on roaming folder
Go to npm folder inside roaming and check if a file named clasp is there or not
If yes, then add the path to npm in environment variables
In my case the path is C:\Users\HARI\AppData\Roaming\npm

Why I can use node.js without settiing environment variable path on windows?

I use windows10.
My node.js's path is C:\Program Files\nodejs\node.exe and I can use node command.
But I haven't set my environment variable path.
It does not mean just that I have not set it myself. I checked the user environment variables and the system environment variables but could not find them. (The path of npm was in the user environment variable.)
Why can I use node command without setting path?
For the node command to work in Windows from a command shell, one of the following must be true:
Your current directory in the command shell is C:\Program Files\nodejs and thus node.exe or node.bat can be found in that current directory.
C:\Program Files\nodejs is in the search path which can be either a system wide path setting or a local user path setting (what you see in the environment is a combination of those two).
There is a node.bat file somewhere in your system path or in the current directory that launches node.exe for you by directly referencing its path.
On Windows, you can type "where node" in the command shell and it will tell you where it's finding the file to run. If what it is finding is not in the current directory, then you must have its directory in your path somewhere.

node is not recognized as an internal or external command operable program or batch file

I am on windows 7. I downloaded node v6.2.0 via the msi. I can run node from c:\Program Files\nodejs. However, When I try to run it from a subdirectory under Program Files\nodejs, I get the 'node' is not recognized as an internal or external command operable program or batch file error.
I have C:\Program Files\nodejs\; in both my System and User PATHS.
Is there a way to make nodejs available in subdirectories? Also can you make nodejs available to all directories and subdirectories?
using the installer itself does not make nodejs apply globally at least on my machine (windows 7). Yes, it does apply nodejs to the system environment variable path and user variable path, but to make it apply globally you need to open the dos cmd and set the path c:\SET PATH=c:\Program Files\nodejs;%PATH%. Once I did this, node was available to all directories and subdirectories.

Installing GLPK

I'm following this link for installing GLPK which I intend to use to conduct some optimization. When I've downloaded GLPK, and added
C:\Windows\System32 and C:\Windows\SysWOW64
to PATH for environment variables and try to execute one of the example files (even by opening the cmd window in the file where the test file is located) by doing
glpsol --model assign.mod
It says that
glpsol is not a internal command, external command, program or command file.
When I open the command in the win64 folder (a subfolder of glpk) then I can do:
glpsol.exe --help
and get information. I can also see the glpsol programfile in the folder. However when I try to open a model somewhere on my computer it does'nt recognize glpsol. Isn't that why you add System32 into your PATH?
In the guide it says that
...Therefore it is suggested to copy the DLLs to %SystemRoot%nsystem32.
Is this something that you must do? Which are these DLLs? Can you do this using a command in the cmd file? I thinking that including System32 into the path does this?
I've added SysWOW64 into the path due to me using 64 Bit Windows 7. Not sure if it is the way to go though.
Hope someone can shed some light into this!
Regards,
To use glpsol outside of the dedicated folder you have to put the relevant files somewhere, where your System can recognize them (somewhere in the defined Path Environment)
The "DLLs" are just the glpk_X_XX.dll, for 64bit systems use the dll in the w64 folder and put it in the SysWOW64. Now your System will find the dll - but still not glpsol. Just copy the glpsol.exe in system32 for that, and voilĂ  your done.
Adding the GLPK Directory to the Environment Path should also work.

Resources