Что случилось со всеми 171 зависимостью `npm`?

Что случилось со всеми 171 зависимостью `npm`?
$ sudo apt-get install npm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gyp libjs-inherits libjs-is-typedarray libjs-psl libjs-typedarray-to-buffer libnode-dev libuv1-dev node-abbrev node-agent-base node-ajv
  node-ansi node-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap node-asn1
  node-assert-plus node-asynckit node-aws-sign2 node-aws4 node-balanced-match node-bcrypt-pbkdf node-brace-expansion node-builtins
  node-cacache node-caseless node-chalk node-chownr node-clone node-color-convert node-color-name node-colors node-columnify
  node-combined-stream node-concat-map node-console-control-strings node-copy-concurrently node-core-util-is node-dashdash node-debug
  node-defaults node-delayed-stream node-delegates node-depd node-ecc-jsbn node-encoding node-err-code node-escape-string-regexp
  node-extend node-extsprintf node-fast-deep-equal node-forever-agent node-form-data node-fs-write-stream-atomic node-fs.realpath
  node-function-bind node-gauge node-getpass node-glob node-graceful-fs node-gyp node-har-schema node-har-validator node-has-flag
  node-has-unicode node-hosted-git-info node-http-signature node-https-proxy-agent node-iconv-lite node-iferr node-imurmurhash
  node-indent-string node-inflight node-inherits node-ini node-ip node-ip-regex node-is-typedarray node-isarray node-isexe node-isstream
  node-jsbn node-json-parse-better-errors node-json-schema node-json-schema-traverse node-json-stable-stringify node-json-stringify-safe
  node-jsonify node-jsonparse node-jsonstream node-jsprim node-leven node-lockfile node-lru-cache node-mime node-mime-types
  node-minimatch node-mkdirp node-move-concurrently node-ms node-mute-stream node-nopt node-normalize-package-data node-npm-bundled
  node-npm-package-arg node-npmlog node-number-is-nan node-oauth-sign node-object-assign node-once node-opener node-osenv node-p-map
  node-path-is-absolute node-performance-now node-process-nextick-args node-promise-inflight node-promise-retry node-promzard node-psl
  node-puka node-punycode node-qs node-read node-read-package-json node-readable-stream node-request node-resolve node-resolve-from
  node-retry node-rimraf node-run-queue node-safe-buffer node-semver node-set-blocking node-signal-exit node-slash node-spdx-correct
  node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-string-decoder node-string-width
  node-strip-ansi node-supports-color node-tar node-text-table node-through node-tough-cookie node-tunnel-agent node-tweetnacl
  node-typedarray-to-buffer node-unique-filename node-universalify node-uri-js node-util-deprecate node-uuid
  node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which node-wide-align node-wrappy
  node-write-file-atomic node-yallist
The following NEW packages will be installed:
  gyp libjs-inherits libjs-is-typedarray libjs-psl libjs-typedarray-to-buffer libnode-dev libuv1-dev node-abbrev node-agent-base node-ajv
  node-ansi node-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-asap node-asn1
  node-assert-plus node-asynckit node-aws-sign2 node-aws4 node-balanced-match node-bcrypt-pbkdf node-brace-expansion node-builtins
  node-cacache node-caseless node-chalk node-chownr node-clone node-color-convert node-color-name node-colors node-columnify
  node-combined-stream node-concat-map node-console-control-strings node-copy-concurrently node-core-util-is node-dashdash node-debug
  node-defaults node-delayed-stream node-delegates node-depd node-ecc-jsbn node-encoding node-err-code node-escape-string-regexp
  node-extend node-extsprintf node-fast-deep-equal node-forever-agent node-form-data node-fs-write-stream-atomic node-fs.realpath
  node-function-bind node-gauge node-getpass node-glob node-graceful-fs node-gyp node-har-schema node-har-validator node-has-flag
  node-has-unicode node-hosted-git-info node-http-signature node-https-proxy-agent node-iconv-lite node-iferr node-imurmurhash
  node-indent-string node-inflight node-inherits node-ini node-ip node-ip-regex node-is-typedarray node-isarray node-isexe node-isstream
  node-jsbn node-json-parse-better-errors node-json-schema node-json-schema-traverse node-json-stable-stringify node-json-stringify-safe
  node-jsonify node-jsonparse node-jsonstream node-jsprim node-leven node-lockfile node-lru-cache node-mime node-mime-types
  node-minimatch node-mkdirp node-move-concurrently node-ms node-mute-stream node-nopt node-normalize-package-data node-npm-bundled
  node-npm-package-arg node-npmlog node-number-is-nan node-oauth-sign node-object-assign node-once node-opener node-osenv node-p-map
  node-path-is-absolute node-performance-now node-process-nextick-args node-promise-inflight node-promise-retry node-promzard node-psl
  node-puka node-punycode node-qs node-read node-read-package-json node-readable-stream node-request node-resolve node-resolve-from
  node-retry node-rimraf node-run-queue node-safe-buffer node-semver node-set-blocking node-signal-exit node-slash node-spdx-correct
  node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-string-decoder node-string-width
  node-strip-ansi node-supports-color node-tar node-text-table node-through node-tough-cookie node-tunnel-agent node-tweetnacl
  node-typedarray-to-buffer node-unique-filename node-universalify node-uri-js node-util-deprecate node-uuid
  node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which node-wide-align node-wrappy
  node-write-file-atomic node-yallist npm
0 upgraded, 172 newly installed, 0 to remove and 2 not upgraded.
Need to get 3,713 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Absolutely not! What is all this?
Abort.

Это оооочень много зависимостей. Это всегда так при установке?нпм? Почему или почему нет?

решение1

npmтакже устанавливает рекомендуемые пакеты, количество которых можно уменьшить.

Цитирую ответ на пост Почему NPM устанавливает так много пакетов?

Вы можете сократить количество установленных пакетов, предоставив --no-install-recommends:

sudo apt-get install npm --no-install-recommends


Сравнение для минимальной системы 20.04 LTS:

  • sudo apt-get install npm

    0 обновлено, 516 новых установлено, 0 для удаления и 0 не обновлено.

  • sudo apt-get install npm --no-install-recommends

    0 обновлено, 313 новых установлено, 0 для удаления и 0 не обновлено.

Обратите внимание, что эффективность параметра --no-install-recommendsзависит от того, как был собран пакет npm для вашего дистрибутива. На некоторых дистрибутивах он не имеет никакого эффекта.

Связанный контент