Reader small image

You're reading from  JavaScript from Frontend to Backend

Product typeBook
Published inJul 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781801070317
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Eric Sarrion
Eric Sarrion
author image
Eric Sarrion

Eric Sarrion is a trainer and a developer as an independent consultant. He has been involved in all kinds of IT projects for over 30 years. He is also a long time author in web development technologies and is renowned for the clarity of his explanations and examples.
Read more about Eric Sarrion

Right arrow

Using downloaded modules with npm

In addition to the modules internal to Node.js, it is possible to import modules from the internet using the npm utility provided with Node.js.

For this, the npm command is used (in a command interpreter) by indicating arguments that allow you to perform the corresponding actions on the imported modules.

Using the npm command

Here are some common uses of the npm command:

  • npm install moduleName: Installs the indicated module in the local node_modules directory. The module will only be accessible for the current application and not for other applications (unless it is installed again).
  • npm install moduleName -g: Installs the specified module in the global node_modules directory. The -g option allows you to indicate that this module can be accessed by other applications because it is installed in the node_modules directory of Node.js (globally).
  • npm link moduleName: It is possible that a module installed globally (with the -g...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
JavaScript from Frontend to Backend
Published in: Jul 2022Publisher: PacktISBN-13: 9781801070317

Author (1)

author image
Eric Sarrion

Eric Sarrion is a trainer and a developer as an independent consultant. He has been involved in all kinds of IT projects for over 30 years. He is also a long time author in web development technologies and is renowned for the clarity of his explanations and examples.
Read more about Eric Sarrion