B
B
Bogdan Gerasimenko2017-02-25 13:47:36
npm
Bogdan Gerasimenko, 2017-02-25 13:47:36

Am I installing modules correctly via NPM?

I'm trying to install the Socket.io module in my project folder, but after executing the command
npm install socket.io --save, about 80 modules appear in the node_modules folder.
Is this how it should be or can I remove everything except the desired module?
And one more question: there is also node_modules in the Node.js folder, but only npm is there.
Maybe modules need to be put in it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-02-25
@Kleindberg

Is this how it should be or can I remove everything except the desired module?
That's right, don't delete anything. Each module can have dependencies, which can have their own dependencies, and so on. Therefore, usually when installing one module, several are installed.
Maybe modules need to be put in it?
Global modules are placed there - those that are used not in a specific project, but in general on your computer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question