2
Why does this happen at the Windows 10 prompt? Commands like in filename.js works.
It happens when I try:
node_modules/mocha/bin/mocha
In the environment variables I put:
%USERPROFILE%\AppData\Roaming\npm
I tried with the username, with C:
, nothing worked. The mocha module has not been installed overall, it is in another folder node_modules
inside the project folder, I also put this path in the PATH and nothing.
How does it work node_modules
, global, local installation and how this applies to Windows with environment variables?
Hello, welcome! You can give an example of the code you are using
mocha
? Usually you donpm install mocha
eventually with-save
or-save-dev
.– Sergio
Hello I discovered the problem needed to put Node node_modules/mocha/bin/mocha, to work, thanks.
– gise
You had done
npm install -g mocha
?– Sergio
Yes, the problem is that I was following a tutorial that uses Mac and has some divergences of commands, I went through it several times. On your Mac you don’t need to type Ode before the path (path - node_modules/mocha/bin/mocha).
– gise
And joined the path in windows PATH?
– Sergio
The path was no longer certain, but it only recognized the command with the word "Node" before the node_modules/mocha/bin/mocha command.
– gise