V
V
vitaly_742020-07-09 02:45:21
Windows
vitaly_74, 2020-07-09 02:45:21

Why does the system not see installed npm modules?

I work on win10 and immediately active 2 users, user A and created from under user A, user B. I use the command line both there and there.
Both users are admins.
problem: when I install the npm install -g typescript module on user B, I then try to run the tsc submodule - it says "tsc" is not an internal or external
command, operable program or batch file.
As a result, I can't compile the code.
but I do the same thing from under user A - everything goes without problems.
however, I need to do this exclusively on user B. I
tried restarting the console and running it with admin rights.
The tsc itself is located in the npm folder along the path C:\Users\UserB\AppData\Roaming\npm
.
[email protected] C:\Program Files\nodejs\node_modules\npm

What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vitaly_74, 2020-07-09
@vitaly_74

I will answer my own question:
In the environment variables, you need to add the path to the npm folder to the path variable, but I added a new node_modiles variable and added the path to npm there,
i.e. we go into the environment variables and add C:\Users\UserB\AppData\Roaming\npm to the path exactly to PATH and not to any other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question