N00b: usage of NPM flags when installing electron


I just start with electron.

  1. Installed node.js.
  2. Did: npm install npm@latest -g

Now I have to install electron, but have 2 choices:

  1. npm install electron
  2. npm -g install electron

Which is OK and why?



Never mind. Found the answer.

-g flag puts electron in PATH variable (but not on Windows?)


The -g flag installs a package in your global NPM folder. On Windows, that should be AppData/Roaming/npm, which should already be on your PATH from when you installed Node.