I'm trying to use node modules like httpster and nodemon on Windows 10 for both me and my daughter on separate accounts. As administrator, I can use it from my own account. My daughter can't use it from her account. The PATH is not being set correctly.
In the Environmental User Variables, I have this:
%userprofile%\AppData\Roaming\npmThis will expand to the following on both accounts "dad" and "daughter".
C:\Users\dad\AppData\Roaming\npmWhen my daughter tries to install nodemon globally with the -g option, it will attempt to install it in C:\Users\dad\AppData\... and not C:\Users\daughter\AppData\...
My daughter's account cannot write global modules to my administrator account. How can I configure node/npm so that it is writing my global node to a place where we both access it and it is in both of our PATHs?
Even if I add the modules to my account, she won't be able to execute the nodemon or httpster from her account unless she uses an administrator account. She's a child and I am teaching her to use node and express.
I also have NODE_PATH set to %AppData%\npm\node_modules in User variables.
Note that I can get this to work on Windows 10 if I use the Linux Subsystem for Windows.
Using the Microsoft Linux Subsystem, I put this in my daughter's .bashrc
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modulesI also created a bash shell script called go.sh that contains this:
#!/bin/bash
cd /mnt/c/Users/daughter/Documents/development/practiceShe can use this with
$ . go.shand go directly to her files.
However, I'm still curious if there is a solution to use global node_modules on Windows 10 with multiple users using DOS.
Reset to default