I'm using Windows as a simple user (I don't have any admin rights) and want to install Yarn and use commands like Yarn Install, Yarn Add and Yarn Start.
I found this on Stackoverflow about how to install Node.JS as a local user but I cannot make it work outside that folder: install NodeJS LTS on Windows as a local user (without admin rights)
I now have Node unpacked in the folder: C:\Users\USERNAME\Applications\node and I have added it my path to my variables using: rundll32 sysdm.cpl,EditEnvironmentVariables
. I can run node -v
and npm -v
and it works. I have installed Yarn using npm install --global yarn
but I cannot make it work outside of that folder.
I want to go to D:\projects\projectName\app-dev and run Yarn Install to install dependencies from a project I cloned from GitHub. How do I make it work?
UPDATE!
For anyone out there the issue was not with Yarn. It was actually with Node.JS and the PATH
in environment variable. For whatever reason until I restarted my computer the PATH did not update to include the new location of Node.JS. Make sure you read the answer from this question and you should not have any issues.
install NodeJS LTS on Windows as a local user (without admin rights)
You might be able to install Yarn locally with
npm i -S yarn
and then SET PATH=%PATH%;c:\to\your\project\node_modules\.bin\yarn
Now in the same terminal window you can use it with yarn install ...
Execute npm bin -g
which will print the folder name where npm installs executables and add that folder to your path. Restart the command prompt/powershell and it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With