M
M
Maxim Romashko2017-08-24 12:39:43
Node.js
Maxim Romashko, 2017-08-24 12:39:43

What is the difference between npm init and npm install?

Please tell me, I can't understand it for the life of me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-08-24
@md5inj

npm initasks you various questions and creates a package.json that defines the project settings, dependencies, scripts, name, and more.
npm install [module]installs a module named module.
That is, to get started, you first need to do npm init(you can use the option --yes, which will set default answers to all questions), and then install the modules with the commandnpm install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question