Reading the comments, I understood something else, that the user would install node packets offline and not use them in the browser. As the previous answer proves useful to other users I will not delete it.
There is a folder of the node (which in windows I do not know where it is, but probably where you installed nodejs) where all the node_modules that you install with the command -g
, and a folder of binaries /bin
where it places the identified binaries in the package.json
, in windows the node adds in the PATH
(system variable) this folder, then the executables are found in the console. You can do this manually if you can not use npm install
.
In linux, they usually stay in: /usr/local/lib/node_modules/
And the binaries it does symbolic link in: /usr/local/bin/
Note: The folder may vary from distro to distro.
How to change the windows PATH? (open topic to help you by not polluting your question and not by placing external link)
The other way is for you to execute the binaries directly from the folder, they will also work, let's assume you are in the folder of your project and want to run grunt
.
Your project folder type:
./node_modules/grunt-cli/bin/grunt
I recommend using a windows power-shell to work with NPM and not the prompt, because you will have a more elegant environment.
Finally, do not forget that where you are copying your ./node_modules/
if it was installed with -g will not be in the project folder but in the installation folder of nodejs, so to use and copy all of it project install all dependencies without the -g
, to be able to use relative path as of the example.