2
I installed the nodejs v0.12.6
on my computer with windows
but I had some problems.
The first one I found a solution in the internet very simple e I thought that everything would work normally however when trying to install some package, in this case the hex it installs perfectly but when trying to run the command it returns the following message:
'hexo' is not recognized as an Internal or External command, operable program or batch file.
But when accessing the directory of npm
where the hexo
was installed in my case C:\Program Files\nodejs\node_modules\npm
and execute the command that initializes a blog using the hex:
hexo init blog
Inside this directory:
C:\Program Files\nodejs\node_modules\npm>hexo init blog
INFO Copying data to C:\Program Files\nodejs\node_modules\npm\blog
INFO You are almost done! Don't forget to run 'npm install' before you start blogging with Hexo!
It installs and generates the files perfectly.
Is there any way to fix this? Because I need it to recognize the command regardless of which directory I am in, because in the npm
is not a suitable place.
I had installed globally earlier, removed now and reinstalled to see if I had forgotten something but apparently not. Still not recognizing as you can see in the image: http://i.imgur.com/tJjgPRA.png but inside npm works correctly: http://prntscr.com/7pzdmw
– user23124
Well, when checking the environment variables the path where the modules get installed were not available. Just add the full path
C:\Program Files\nodejs\node_modules\npm
and it worked perfectly, because as it wasC:\Program Files\nodejs
does not work. Please add your reply and I will mark it as correct and thank you very much.– user23124
In a way I had already mentioned that the path needed to be in the PATH, but I edited to make it clearer.
– bfavaretto