Node_modules is not recognized

1

Why does this happen at the Windows 10 prompt? Commands as in filename.js works.

This happens when I try:

node_modules/mocha/bin/mocha

In the environment variables I put:

%USERPROFILE%\AppData\Roaming\npm

I've already tried the username, with C: , nothing worked. The mocha module was not installed globally, it is in another folder node_modules within the project folder, I also put that path in the PATH and nothing.

How does node_modules work, global, local installation, and how does this apply to Windows with environment variables?

    
asked by anonymous 26.01.2017 / 18:17

1 answer

-2

The command is from a node class and in the class the teacher uses Mac and in the class was only to install the mocha and then to enter this command line, but in the PC that is my case (Windows) it does not accept the command without the word "node" in front, I even went back to class several times, but the teacher using Mac does not type "node" and Windows worked like this:

node node_modules / mocha / bin / mocha

Just typing:

node_modules / mocha / bin / mocha

Cause the error "Node_modules is not recognized", which is why I ask for help here in the forum. I answered, because I saw that a person commented and if anyone has this error here is the answer.

(Answer edited because of bad points, I did not know I had to write a completed response)

    
28.03.2017 / 19:53