Which command is used to install a Node.js package globally?

  • npm global install
  • npm i -g
  • npm install -g
  • npm add -g
To install a Node.js package globally, you should use the npm install -g command. This makes the package available for use across different projects. The other options may not work as expected or are not the recommended way to install packages globally.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *