N00b: usage of NPM flags when installing electron


#1

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?

TIA, A.


#2

Never mind. Found the answer.

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


#3

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.