How can I find path of AWS CLI in windows - aws-cli

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.

Related

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

How to install node.js in a custom directory through powershell?

I am making a script to install NodeJS on several machines through PowerShell.
By default NodeJS gets installed in C:\Program Files\nodejs folder. Can I define a custom directory for the installation?
I am running this command:
msiexec.exe /i $nodejs_download_filename /L*V "logger.log" /passive | out-null
Is there any argument to add to this line in order to specify the target directory instead of the default one?
You can refer this
Install Node.js on a different hard drive from C to D
You can move the node.exe to the d drive. Then check your environment path.
Type set in a command window or in computer properties.
Make sure you have the folder that contains node.exe in your path.
Running node in a command window will work from any folder then.
For installed npm packages, ie.. node_modules folder..
That just needs to be in a directory above where your writing your code, so try putting that folder in d:\ Assuming your going to be writing your apps on the d drive now.
In .npmrc file, change prefix setting to desired folder. Global packages get installed in node_modules under that folder.

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.

How to set up PATH during Nodist installation in Windows

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.

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.

Resources