2

I am using Windows and I followed this tutorial and this one which should teach me how to install JPM. I installed node.exe to the folder C:\nodejs as instructed, but I cannot find any npm or jpm program which I am supposed to launch like this:

npm install jpm --global

It seems like the tutorials are for Linux but I am lost here while using Windows because I cannot find programs like the ones mentioned in (sub)folders like bin etc.

andih
  • 5,570
  • 3
  • 26
  • 36
John Boe
  • 3,501
  • 10
  • 37
  • 71

1 Answers1

3

Do the following:

  1. Install Node.js as suggested from their website. (This shall add the npm application to your PATH variable so you do not need to do anything else for it to run from the command prompt.)
  2. Then skip the testing step and execute npm install jpm --global as suggested from cmd.exe without typing anything else. (If you are havng trouble, run cmd.exe as administrator, that might help.)
  3. After that just type jpm as the tutorial states and it will work properly. (It should show a list of available commands. To create a new add-on, follow this tutorial.)

I followed these exact steps for my installation on Windows 7 x64 Ultimate and it worked perfectly fine. If you have any problems, comment below, I'll try to help!

Angelos Chalaris
  • 6,611
  • 8
  • 49
  • 75
  • Ah, I though it needs to be some .exe file there on disk. It run the npm.cmd file - batch or what it is. Thank you. Now it installed. – John Boe Jun 29 '16 at 12:30
  • Please can you help yet with one more sentece? "Add the following line to the end of the file $HOME/.profile to add it to your PATH permanently (as the file .profile is executed every time a new terminal is opened" Where is the file located? What is home? Is it profile of Firefox or directory of Windows documents? – John Boe Jun 29 '16 at 12:47
  • @JohnBoe when installing Node.js, it should have had an option in the installer to add Node.js to the `PATH` of your system, if not edit your `PATH` environment variable following the steps from [here](http://www.nextofwindows.com/how-to-addedit-environment-variables-in-windows-7) and add the proper path for your installation to the `PATH` varIAble after adding a `;` (mine is something like `C:\Program Files\nodejs\ ` so I would add `;C:\Program Files\nodejs\ ` to the end of my`PATH`). – Angelos Chalaris Jun 29 '16 at 12:55
  • But the path is totaly different, the tutorial is unclear. My folder is `C:\Documents and Settings\Administrator\Data aplikací\npm\node_modules` and `C:\Documents and Settings\Administrator\Data aplikací\npm\node_modules\jpm`. But this is not in the PATH. In PATH there is: `C:\Documents and Settings\Administrator\Data aplikací\npm` – John Boe Jun 29 '16 at 13:02
  • The installation directory of Node.js should be something similar to what I mentioned above. What you are referring to is I think where the `npm`'s downloaded modules are stored. Anyways, what you should do is find your `System environment variables`, then click on the `PATH` variable from the list and add `;yourpathhere` at the end of it, where `yourpathhere` is the installatin directory of Node.js, specifically where the `node.exe` file is and another file like `npm.cmd` which is what your command prompt will be using to install the `jpm`. – Angelos Chalaris Jun 29 '16 at 13:06
  • Actually try running the second step from my original answer in your `cmd.exe`, if it does run like that, skip the changing of the `PATH` environment variable alltogether! – Angelos Chalaris Jun 29 '16 at 13:07
  • So I found that the HOME directory must be this: C:\nodejs\node_modules\npm because it contains next subfolder called node_modules So I guess they want to add this folder to PATH: `C:\nodejs\node_modules\npm\bin` – John Boe Jun 29 '16 at 13:10
  • @JohnBoe why don't you try that and see if it works? If it doesn't you can always go back and change the value you added and find the one you need to add. If it doesn't work, let me know! – Angelos Chalaris Jun 29 '16 at 13:11
  • But this one is also similar: `C:\Documents and Settings\Administrator\Data aplikací\npm\node_modules\jpm\node_modules\.bin` here is the dot which they wrote in the command and the folder npm is bigger than the second one – John Boe Jun 29 '16 at 13:14
  • Ok, where did you install Node.js? I believe it is `C:\nodejs\ ` in your case. If that is the case, add that to your `PATH`. **But first** try running the command from step 2 and if it already works, skip the environment variable step entirely and just use `jpm` right away after the `npm install jpm --global` command has finished running. – Angelos Chalaris Jun 29 '16 at 13:16
  • I am confused that the program set different path to my enviroment PATH that I wanted to. So I have two different folders. One is node.js folder and the second one is C:\Documents and Settings\Administrator\Data aplikací\npm\node_modules\jpm\node_modules\.bin . I can run jpm from cmd anywhere. However I did not expect that it will use this location. I would better move all folders on different partition to have more space on system disk. So I would change the paths again and hope nothing will corrupt. – John Boe Jun 29 '16 at 13:26
  • @JohnBoe **DO NOT CHANGE ANYTHING, THE JPM AND NPM BEHAVIOUR SEEMS TO BE THE INTENDED ONE**. Seriously, if you can run `jpm` from anywhere that is exactly what should happen at the end of the installation, changing the environment variables was not necessary for me and it should not be necessary for you. What changing the `PATH` variable does is it will enable you to use npm and jpm from anywhere and you seem to have achieved exactly that. Just use `jpm` normally and carry on with the rest of your work, no need to change anything! - Also sorry for the caps, had to get your attention. – Angelos Chalaris Jun 29 '16 at 13:29
  • OK, thanks. If I will run into problems due to disk space I will remove these programs. – John Boe Jun 29 '16 at 13:40