$ 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 套件是如何為您的發行版建立的。在某些發行版上它沒有效果。