Setting NODE_PATH in Cloud9 IDE - cloud9-ide

!Short version: How can I set the NODE_PATH environment variable in a Cloud9 workspace?
Detail:
I'm trying to get MeanJS set up in a Cloud9 workspace. I first use nvm to upgrade Node from 0.10 to 0.12. Apparently, nvm doesn't set the NODE_PATH variable, so when I try to install Yo, I get an error. But I can't figure out how to set the NODE_PATH, or what the value should be.
Thanks in advance!

You can set NODE_PATH by editing ~/.bashrc file same way as on any other linux system.
Home folder is hidden by default, but can be shown using gear menu at the top of the tree.

Related

Yarn (Binary) Offline installation on Centos 7

How do i install Yarn (binary) offline on Centos 7. The machine doesn't have internet. Apologise if the question has been asked before.
I couldn't find it anywhere. All Questions point to using Yarn in offline mode but not how to install it offline at the first place.
Finally, i managed to do it via tarball (Note this is Linux installation).
You can install Yarn by downloading a tarball and extracting it anywhere.
cd /opt
wget https://yarnpkg.com/latest.tar.gz
tar zvxf latest.tar.gz
Yarn is now in /opt/yarn-[version]/
the following steps will add Yarn to path variable and run it from anywhere.
Note: your profile may be in your .profile, .bash_profile, .bashrc, .zshrc, etc.
Add this to your profile:
export PATH="$PATH:/opt/yarn-[version]/bin"
(the path may vary depending on where you extracted Yarn to)
In the terminal, log in and log out for the changes to take effect
To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. To do this, add
export PATH="$PATH:`yarn global bin`"
to your profile.
Here is the link i found it
Although Yarn can work in offline mode, the packages must be downloaded and stored in the in an offline mirror. Refer to this article.
Your Centos machine will need to be connected to another machine that has access to the Internet. The most common solution is to set up a http/https proxy, then set up yarn to use the proxy
yarn config set proxy http://proxy.server.com:8080
yarn config set https-proxy http://proxy.server.com:8080

conda update CondaHTTPError: HTTP None

Midway through running Conda Update --all, the update stalled. Multiple packages had been updated. Now, when I run conda update --all or conda update conda, I get this response:
(C:\Users\*****\AppData\Local\Continuum\Anaconda3) C:\Users\*****>conda update conda
Fetching package metadata ...
CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),),)
I've repeated conda update conda over multiple days, with no change in results. I can see there is no HTTP, however conda info --a shows channel URLs.
(C:\Users\*****\AppData\Local\Continuum\Anaconda3) C:\Users\*****>conda info -a
Current conda install:
platform : win-64
conda version : 4.3.13
conda is private : False
conda-env version : 4.3.13
conda-build version : 2.1.5
python version : 3.5.3.final.0
requests version : 2.13.0
root environment : C:\Users\*****\AppData\Local\Continuum\Anaconda3 (writable)
default environment : C:\Users\*****\AppData\Local\Continuum\Anaconda3
envs directories : C:\Users\*****\AppData\Local\Continuum\Anaconda3\envs
C:\Users\*****\AppData\Local\conda\conda\envs
C:\Users\*****\.conda\envs
package cache : C:\Users\*****\AppData\Local\Continuum\Anaconda3\pkgs
C:\Users\*****\AppData\Local\conda\conda\pkgs
channel URLs : https://conda.anaconda.org/anaconda-fusion/win-64
https://conda.anaconda.org/anaconda-fusion/noarch
https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/win-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : C:\Users\*****\.condarc
offline mode : False
user-agent : conda/4.3.13 requests/2.13.0 CPython/3.5.3 Windows/7 Windows/6.1.7601
How do I get conda update to call a correct HTTP address?
My original answer got flagged as duplicate because I answered a similar question with the same answer, I wasn't aware that this is not allowed. I have marked my other response as a duplicate. Hopefully, this stays up!
I almost spent two days running in circles trying all the solutions I could find on the Internet, but here is what worked for me.
So, CondaHTTPError aka SSL module is not available error is caused by the missing/misplacement of libcrypto file in anaconda3/DLLs folder:
Tl;dr:
From anaconda3\Library\bin copy below files and paste them in anaconda3/DLLs:
- libcrypto-1_1-x64.dll
- libssl-1_1-x64.dll
Detailed answer:
Uninstall any Python versions you have (e.g. Python 3.7 or Python 3.8)
go to Control Panel--> Program and Features--> Select Python-->
uninstall
Uninstall any Anaconda versions you might have (e.g. Anaconda or miniConda)
For Anaconda:
go to Control Panel--> Program and Features--> Select Anaconda-->uninstall
For miniConda
go to Control Panel--> Program and Features--> Select miniconda--> uninstall
Delete any leftover Environment variables
go to Control Panel--> System--> Advanced System settings (on left side)--> in System Properties click on Environment Variables button--> in User Variable select Path and click the Edit button--> delete any path related to Anaconda, miniConda or Python.
E.g.
C:\Users\Bob \AppData\Local\Programs\Anaconda\...
C:\Users\Bob \AppData\Local\Programs\miniconda\...
b. If you don’t see any paths related to Anaconda, miniConda or Python; you are good to go.
Reboot your machine
Download the latest version of Anaconda
Run the Installer; keep all the default settings
Go to your anaconda3/library/bin folder:
E.g.C:\Users\Bob\AppData\Local\Continuum\anaconda3\Library\bin
Copy these files:
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
paste these in anaconda3/DLLs folder:
Reopen the Anaconda Prompt and test with any command that requires an Internet connection.
E.g.
conda update conda
Or with
conda update --all
Use the code below in your command line :
conda config --set ssl_verify no
Check if you're behind a corporate firewall that has an HTTPS/SSL proxy. If so, you may need to change the line in .condarc from ssl_verify: true to ssl_verify: false.
Or, as suggested by th0masb in the comments, using the command:
conda config --set ssl_verify false
Try to start Anaconda Prompt as Administrator (click right button of mouse before starting it), and make the same order.
Install the latest OpenSSl from this site: https://slproweb.com/products/Win32OpenSSL.html the current latest version is 1.1.1. Now I can install packages via pip and conda successfully.
I faced the same problem on Mac OS X and with Miniconda. After trying many of the proposed solutions for hours I found that I needed to correctly set Condas environment to use the Root certificate that my company provided rather than the generic ones that Conda provides.
Here is how I solved it:
Open Chrome, got to any website, click on the lock icon on the left
of the URL. Click on «Certificate» on the dropdown. In the next
window you see a stack of certificates. The uppermost (aka top line
in window) is the root certificate (e.g. Zscaler Root CA in my case,
yours will very likely be a different one).
Open Mac OS keychain, click on «Certificates» and choose among the many certificates the root certificate that you just identified. Export this to any folder of your choosing.
Convert this certificate with openssl: openssl x509 -inform der -in /path/to/your/certificate.cer -out /path/to/converted/certificate.pem
For a quick check set your shell to acknowledge the certificate: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem
To set this permanently open your shell profile (.bshrs or e.g. .zshrc) and add this line: export REQUESTS_CA_BUNDLE=/path/to/converted/certificate.pem. Now exit your terminal/shell and reopen. Check again.
You should be set and Conda should work fine.
PS: I'm aware that OP works on Windows. Nonetheless I leave this solution here because I think it can help solving the underlying root cause.
Type "conda config --show" to check the configuration information and make sure the addresses in the channels can be accessed normally.
I am using python 3.7.4 and I have just downloaded the conda and tried setting up the tensorflow but got http error.
I tried several steps mentioned above but it dint solve my problem.
I solved it by first activating conda. if you are using conda for first time you need to activate it using conda init command and then disable SSL verification conda config --set ssl_verify false
After above steps my tfp setup worked perfectly!!!
Download cacert.pem from https://curl.haxx.se/ca/cacert.pem,
save to /this/is/cert/path
open ~/.bashrc or any profile file you have
add export REQUESTS_CA_BUNDLE=/this/is/cert/path ...
open new terminal
conda update conda
You should check your .condarc file located in your Miniconda3/Anaconda3 root directory. There should be a line with just a hyphen. This line corresponds to the None channel. Deleting the line fixed the issue for me.
For the type of error above, you have to remove the proxy in environment variable. To do this follow this step :-
Open the Environment Variables window==>>>>>
To make many of the edits shown in this article, you first need to open the Environment Variables window. This guide explains how to open this window and shows you the basics about working with environment variables: Simple questions: What are environment variables in Windows?
If you want to skip reading it, one path that works the same in all versions of Windows is to open the Control Panel and go to “System and Security - > System.” There, click or tap the “Advanced system settings” link on the left. The System Properties window is opened. There click the Environment Variables button.
In this you have to select that one which have proxy , and delete ,then click Ok.
Now restart your Anaconda prompt.
It worked for me; I hope it also work for you.
Good luck
Enable 'k' flag in your conda update command. For example,
conda update anaconda-navigator -k
That will allow conda to make insecure connections to download packages. This is especially useful when you are behind a proxy server.
Try to type "conda update conda" from the (base) environment
The DLLs delivered by Anaconda3 are located here:
D:\Anaconda3\Library\bin
My workaround:
I have copied the following files
libcrypto-1_1-x64.*
libssl-1_1-x64.*
from D:\Anaconda3\Library\bin to D:\Anaconda3\DLLs.
And it works as a charm!
Just need to add binaries into you path, and done - it will take care about your openssl and everything.
C:\Users\{username}\Miniconda3\Library\bin
Search environment variables, in both User and System variables. Add the bin location in Path. Put the path at the end without changing anything. Save Apply and re-open your terminal. It should be now allowing you to install libraries easily.
I had the same error, and I tried most of the methods, but none of them worked. I checked the version of anaconda3 it was 4.2.0 which I realized was in beta which might be the reason.
I solved it by uninstalling everything and installing the latest version (5.1.0). It worked after that.
Refer link for details
Please update to the latest version of Navigator.
On Navigator click on the update button on the top right of the interface or
on the terminal type
$ conda update anaconda-navigator
After reading FAR too many posts running around in circles, I found a simple solution at least to my flavor of this problem, which should also shed some light on root cause.
Using sudo of same command (see below)
conda create -n tensorenviron
(output below)
Solving environment: done
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/osx-64/repodata.json.bz2>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/r/osx-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))
sudo conda create -n tensorenviron
(output below)
Password:
Solving environment: done
## Package Plan ##
environment location: /Users/damonw/anaconda3/envs/tensorenviron
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use:
# > source activate tensorenviron
#
# To deactivate an active environment, use:
# > source deactivate
#
I also faced the same problem and manually followed these steps to reach the desired result.
you can enter --> https://repo.anaconda.com/pkgs/main/win-64/
you can install packeges whatever you want and later :
you can write to Anaconda Prompt -->
conda install C:\Users\xxxx\Downloads\xlrd-1.2.0-py37_0.tar.bz2
Have a good luck!
Just in case anyone else is stuck behind a company proxy and the previous answers have not worked then try changing your proxies. Interestingly, I had already set my proxies in my environment variables but deleting them and then recreating them worked for some reason for me.
In my case, it was a proxy server setting that was blocking the installation. Switching the proxy server off and then connecting to a different WiFi got it working for me!
Tried everything to fix this issue. Hours of wasted time.
Reset Windows 10 firewall
downgraded/upgraded pip
downgraded/upgraded conda
tried new environments
installed pip from pypi (get-pip.py)
upgraded Debian on Windows environment
Nothing fixed it. Then noticed that other conda environments worked perfectly.
The issue was the pip cache was mangled if you reinstalled an environment with a name you used before and did some sort of upgrade of conda/distro in-between. Under linux i ran the following to fix the issue:
rm -rf $HOME/.cache
and looks like there is a similar setup for Windows based on the info you gave above.
I solved this by changing the proxy.
Change
https_proxy=https://xxx.xxx
to
https_proxy=http://xxx.xxx
make it works.

Laravel command is not working - Windows 7

I'm trying to install laravel command installer, but its not working.
Followed link: http://laravel.com/docs/5.1
I have installed composer successfully, in fact composer command is working fine.
After installing composer, I have run this command:
composer global require "laravel/installer=~1.1"
as said in installation doc.
Output of above command in cmd:
Changed current directory to
C:/Users/xXx/AppData/Roaming/Composer ./composer.json
has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
I have also set environment variables in here:
"My Computer" > "Properties" > "Advanced" > "Environment > Variables"
"Path"
.
I have set both variables User variable and System variable. Also restarted the PC.
But when I run laravel command it says:
'laravel' is not recognized as an internal or external command,
operable program or batch file.
I'm using Windows 7.
Any help would be appreciated. Thanks in advance.
First make sure to find the name of you PC's User. Mostly can be
find in
[C:\Users\[USER_NAME]\AppData\Roaming\Composer\vendor\bin]. Now
this will be available once the Laravel is installed in Widows
platform.
Once you confirmed its location. Go to *My Computer" > "Properties"
"Advanced" > "Environment > Variables > Path'*.
Add semi-colon make sure no space.
Add C:\Users\[USER_NAME]\AppData\Roaming\Composer\vendor\bin with
your user name. Restart command prompt, and you're good to go.
I made some detail Laravel in Installing Laravel 5 with XAMPP or Wamp on Windows Platform
i hope your path in environment variable is wrong you have to set path till vendor/bin directory of composer global
C:\Users\xXx\AppData\Roaming\Composer\vendor\bin
than it will start taking all globally install packages as command.
Make sure to place Composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:
macOS: $HOME/.composer/vendor/bin
Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin
GNU / Linux Distributions: $HOME/.config/composer/vendor/bin or $HOME/.composer/vendor/bin
You could also find the composer's global installation path by running
composer global about and looking up from the first line.
Source : laravel-doc
Did you do composer install? I think that's the problem.

'npm' is not recognized as internal or external command, operable program or batch file

I am completely new to nodejs. I am trying to get nodejs to work on my Windows 2008 box in order to install Karma which I would use for TDDing my AngularJs code. I have done the following steps so far
Install using Chocolatey ==> npm is not recognised
Install using 64-bit nodejs installer from nodejs.org ==> npm is not recognised
At this stage, running where npm gives me c:\User\<Username>\AppData\Roaming\npm which has nothing in it
I figure out that nodejs is installed in C:\Program Files\nodejs. Opening a command prompt in this directory makes npm work fine.
So I added C:\Program Files\nodejs to PATH only to get the same error again that npm is not recognized
One of the github issues on nodejs repository says that I need to restart the machine and it would fix. But that has not helped so far
I do see a Node.js icon in my Start -> Programms mennu which takes me to nodejs console but not sure what to do with that.
Have I missed any important step in the process?
Edit
I figured out that if I open "Nodejs command prompt" from program files, then npm is recognized. How do I make it work on a normal command prompt?
Edit
After node I started facing a similar problem with another application. I posted this question on superuser and as rightly pointed out by the accepted answer, I had an additional quote in my PATH which was causing issues with all the paths added after the quote. I have a feeling that some Chocolatey install adds this troubling quote but I am just not sure which one.
Just add:
;C:\Program Files\nodejs\
To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.
After that, reopen your command prompt and type
npm
This should work.
Don't forget to reboot your computer after installing node! That one got me.
If you are using VS Code, close VS code and open again.
I tried closing Terminal and then opening new Terminal but it didn't work.
Re-Starting VS Code works!
To elaborate on Breno's answer... For Windows 7 these steps worked for me:
Open the Control Panel (Click the Start button, then click Control Panel)
Click User Accounts
Click Change my environment variables
Select PATH and click the Edit... button
At the end of the Variable value, add ;C:\Program Files\nodejs
Click Ok on the "Edit User Variable" window, then click Ok on the "Environment Variables" window
Start a command prompt window (Start button, then type cmd into the search and hit enter)
At the prompt (C:\>) type npm and hit enter; you should now see some help text (Usage: npm <command> etc.) rather than "npm is not recognized..."
Now you can start using npm!
For Windows users: A picture tells a thousand words
Reference: npm not recognized as internal or external command (Note: this is my own blog)
Just Download and Install Node.js from here https://nodejs.org/en/
If you run the downloaded file and install it, they will automatically configure for your system
You don't need any other configurations anymore, now you can use the npm command anywhere
If the Nodejs is successfully installed and still displays the message like this:
'npm' is not recognized as an internal or external command, operable program or batch file.
Follow the steps below for Windows users:
Go to My Computer Properties
Click Advanced System Setting from the Left bar of a window.
Now you have a System Properties window. Click Advanced
Then, Click Environment Variable button
Now you have Environment variable window: From System Variable, Select Path
Click Edit
At the end of the Variable value, add ;C:\Program Files\nodejs\
Note: If you have installed nodejs on other drives then please act accordingly.
Click Ok all the open dialogue box
Very important Note: "Close your Command Prompt And Restart Again"
(It's very important because if you didn't restart your command prompt then changes will not be reflected.)
Now you can use the npm command anywhere
Don't forget to run cmd as admin.
I understand this question is really old and we have many answers, unfortunately, my scenario was different, thus a different solution.
If you started using nvm to manage the node versions after you install the node in your machine, most likely you will be facing the same issue.
I installed a version 10.15.3 and then I had to use another version as there is some tight dependency with one of my projects. Then I decided to install the nvm, while installing it asked, whether I need nvm to manage the version already installed on my machine which is 10.15.3. And yeah, I said Yes hoping that it will take care of that, unfortunately, it didn't.
I was always getting this error no matter I tried many other things mentioned in the other answers here, including setting the path. In the end, to fix that, these are the things I tried.
Uninstall the node version installed, for example, nvm uninstall 10.15.3
Make sure no other node versions are there, nvm list
Then, install the version needed, for example, nvm install 10.15.3. This should give you an output as preceding.
Downloading node.js version 10.15.3 (64-bit)...
Complete
Creating C:\Users\SibeeshVenu\AppData\Roaming\nvm\temp
Downloading npm version 6.4.1... Complete
Installing npm v6.4.1...
Installation complete. If you want to use this version, type
nvm use 10.15.3
PS C:\Users\SibeeshVenu> nvm use 10.15.3
Now using node v10.15.3 (64-bit)
Please note that from the above command, the npm is also installed.
Now use the version you need, nvm use 10.15.3 and type npm
I had the same problem described by Ashu, but in addition to that, the PATH entry for nodejs was terminated by a backslash:
C:\Program Files\nodejs\
I also had to remove that final backslash in order to have it work.
I faced the exact same issue and notice that after installing node.js there was a new path entry in the user variable section for PATH with value --> c:\User\\AppData\Roaming\npm. Also the Path entry in the system variable is appended with --> C:\Program Files\nodejs. Now since user variable has preference over system you have two options to fix this. Either delete the path from user variable or correct the right path (C:\Program Files\nodejs). Restart CMD and it should work.
Set aside all the tips, just run the following line in cmd
> SET PATH=C:\Program Files\Nodejs;%PATH%
If you're getting this error through a service account like Visual Studio TFS Build controller service or any other background service, make sure you restart the service after installing npm as the new PATH environment settings will not be picked up by those already running processes. I was getting same error through my build service but I had npm installed and running in the console.
You might have already received a response but this might help others since I experienced the same issue recently and this is what I did:
Added a path for Powershell. For me, the path was C:\Windows\System32\WindowsPowerShell\v1.0
Then, I opened the command prompt with administrative privileges and ran
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
Next, choco install nodejs
Restart and everything worked fine. Try opening the command prompt without admin privileges and run npm -v
Cheers.
Had the same problem on Windows 8.1 64 bit.
Turns out i get that problem if I start cmd by typing it in the path bar at the top of a folder window or when i shift right click in a folder window and then open command prompt from the list.
When I run cmd using Run or Just from the cmd.exe executable it works.
I installed nodejs following this AngularJS tutorial. the npm command did work when I open a new cmd window but not in the current one.
So the fix was to close and open a new cmd window.
If the package is successfully installed and still shows the message "'npm' is not recognized as an internal or external command, operable program or batch file."
Click windows start button.
Look for "ALL APPS", you will see Node.js and Node.js Command prompt there.
You can run the Node.js Command prompt as administrator and soon as its run it will show the message "Your environment has been set up for using Node.js 6.3.0 (x64) and npm."
and then it works from there...
I ran into this issue as well. It turns out Windows doesn't enjoy single quotes on the command line. The culprit was one of my npm scripts. I changed the single quotes to escaped double quotes:
'npm -s run sass-build'
to
\"npm -s run sass-build\"
I'm updating this thread with a new answer because I've found the solution to my miserable situation after not less than a week ...
For those still experiencing the error even though they have their path value set properly, check your pathext variable to have the value (default value in windows 7 +) : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Mine was to set only to : .BAT and changing it solved the problem. I wonder why nobody brought this up ...
Hope this helps!
If everything looks fine. I would advice to check this for PATHEXT .CMD must be added.
I don't know why most of user suggesting ; / in the command.
I solved this by removing ; and /
Before
;C:\Program Files\nodejs\
After Solution
C:\Program Files\nodejs
You need to save them into system PATH variables
I ran into this problem the other day on my Windows 7 machine. Problem wasn't my path, but I had to use escaped forward slashes instead of backslashes like this:
"scripts": {
"script": ".\\bin\\script.sh"
}
Step 1: install NodeJs
step 2: Set environment path
Step 3: Restart PC once
I installed Node.js and while trying to install Ionic and cordova using this piece of code:
npm install -g cordova ionic
I faced the above error. I added 'C:\Program Files\nodejs' to my Environment Variable 'PATH'. But still was unable to get over this issue. Turned out that my PATH variable was longer than 2048 characters and so I was unable to add the Nodejs path to it. I had to remove the path of another program and add the Nodejs path.
Close and reopen the cmd prompt and try to install Ionic again.
This worked for me.
for me adding path to PATH didn't do the trick.
Run c:\Program Files\nodejs\nodevars.bat instead, it will do the job for you
Well in my case doing testing via Mocha i tried everything just to realize i have to remove single quotes around my test case script tag inside package.json.
I am running mocha test case on all *.test.js files as can see below:
package.json
Before:
"scripts": {
"test": "mocha server/**/*.test.js",
"test-watch": "nodemon --exec 'npm run test'"
}
After(removing single quotes - npm run test):
"scripts": {
"test": "mocha server/**/*.test.js",
"test-watch": "nodemon --exec npm run test"
}
Worked for me, just in case someone else also gets stuck on this.
Check npm config by command:
npm config list
It needs properties: "prefix", global "prefix" and "node bin location".
; userconfig C:\Users\username\.npmrc
cache = "C:\\ProgramData\\npm-cache"
msvs_version = "2015"
prefix = "C:\\ProgramData\\npm"
python = "C:\\Python27\\"
registry = "http://registry.com/api/npm/npm-packages/"
; globalconfig C:\ProgramData\npm\etc\npmrc
cache = "C:\\ProgramData\\npm-cache"
prefix = "C:\\ProgramData\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = C:\WINDOWS\system32
In this case it needs to add these paths to the end of environment variable PATH:
;C:\Program Files\nodejs;C:\ProgramData\npm;
If you used ms build tools to install node the path is here:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VisualStudio\NodeJs
You don't need to "install" Node.js. Just download the package from https://nodejs.org/en/download/releases/ and extract the contents somewhere. Then, in a command prompt, you can navigate there using cd. Then you can run npm from that location. While you will have to do the cd C:\Users\YourAcct\Documents\node-v16.13.0-win-x64 or similar command before you can run it, it's a way to get it onto your computer and run npm without having to be an admin or editing environmental variables.
The issue is with system policy. I have tried the following comments in powers heel then it is started working
$> Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
$> npm install -g npm-windows-upgrade
$> npm-windows-upgrade
I got this idea from the following link
After adding environment varible path restart your machine maybe this will work. it work for me. i was using vm.

Cygwin not executing .bashrc after Heroku Toolbelt Windows install

After installing Heroku Toolbelt, Cygwin is no longer executing .bashrc How do I fix this?
This heroku/toolbelt issue on github Creates/overwrites ENV['HOME'] on Windows, which breaks Cygwin says to
Renaming HOME to %USERPROFILE% evidently fixes this
My HOME System Properties Variable is already named %USERPROFILE%.
Being a noobie I focused on a PATH issue. I began changing my System Path Variable to include the .bashrc PATH
C:\cygwin\home\usermatt
I then tried various system PATH variables, one at a time, restarting my machine each time:
C:\cygdrive\c\home\usermatt\
C:\home\usermatt\
C:\cygwin\c\home\usermatt\
Cygwin's pwd on startup is /cygdrive/c/Users/usermatt. I tried moving .bashrc here without success.
The Cygwin FAQs and the comments in the file itself warn of problems after editing the etc/profile file and I did not try this.
All was well before installing Heroku Toolbelt. How can I get Cygwin to find the .bashrc file?
According to the link you provided:
you need to remove the HOME environment variable from the system
properties. Look how to set/remove variables from Windows permanently.
This will depend on your Windows OS, but in general:
Right click on your "Computer" and select Properties
Click on "Advanced System Settings"
Click on "Environment Variables..."
Find and delete the Home variable
OK your way out and try Cygwin again

Resources