Reading the comments, I understood something else, that the user who install packages Node offline and does not use them in the browser. As the previous answer proves useful to other users I will not delete it.
There is a Node folder (which in windows I don’t know where it is, but probably is where you installed the nodejs) where are all the node_modules that you install with the command -g
, and a binary folder /bin
where he places the binaries identified in package.json
, in windows Node adds in PATH
(system variable) that folder, then executables are found in the console. You can do this manually if you cannot use the npm install
.
Already in linux they usually stay in: /usr/local/lib/node_modules/
And the binaries it makes symbolic link in: /usr/local/bin/
Note: The folder may vary from distro to distro.
How to change windows PATH? (opened the topic to help you by not polluting your question and not putting external link)
The other way is you run the binaries straight from the folder, they will also work, let’s assume that you are in the folder of your project and want to run the grunt
.
Folder of your project type:
./node_modules/grunt-cli/bin/grunt
I recommend using a power-shell windows to work with NPM and not the prompt emulator, because you will have a more elegant environment.
Finally, do not forget that in the place from where you are copying your ./node_modules/
if it was installed with -g will not be in the project folder but in the nodejs installation folder, so to use and copy all of the project install all dependencies without the -g
, to use relative path as in the example.
Can you name which modules you are using and which computer operating systems your work and your home? I suspect that some module of yours is compiled and are different Oss, or else you are doing something wrong
– Emerson Rocha
SO is the same, Windows 7, but for example when I run
grunt test
no prompt is informed thatgrunt não existe ou n é um comando interno..
– Lucio Rubens
vc deu npm install -g Grunt-cli?
– Gabriel Gartz
if I run this command will be downloaded from the network, and my network access is limited, returning a proxy error
– Lucio Rubens