gpt4 book ai didi

node.js - npm install 安装 package.json 中未指定的额外包

转载 作者:搜寻专家 更新时间:2023-10-31 22:22:46 30 4
gpt4 key购买 nike

我在 AWS ec2 实例上有一个相当典型的 package.json。我正在运行 npm install 而不是安装

{
"name": "angular-app-server",
"description": "Back end server to support our angular app",
"version": "0.0.1",
"private": true,
"dependencies": {
"assert": "^1.3.0",
"async": "^0.9.0",
"bcrypt-nodejs": "0.0.3",
"body-parser": "^1.13.1",
"connect-multiparty": "^1.2.5",
"express": "~3.0",
"express-namespace": "~0.1.1",
"express-session": "^1.11.1",
"forever": "^0.14.2",
"mongodb": "^2.0.36",
"multiparty": "^4.1.2",
"nodemailer": "^1.3.4",
"open": "0.0.3",
"passport": "~0.1.12",
"passport-local": "~0.1.6",
"request": "~2.16.6",
"svgo": "^0.5.3"
},
"devDependencies": {
"grunt": "~0.4",
"grunt-contrib-jshint": "~0.2.0",
"grunt-contrib-nodeunit": "~0.1.2",
"rewire": "^2.0.1",
"supervisor": "~0.4.1"
}
}

它正在安装几十个包,(通过 cd node_modules & ls):

abbrev                findup-sync                  on-finished
addressparser first-chunk-stream on-headers
align-text flatiron open
amdefine foreground-child opener
ansi-regex forever optimist
ansi-styles forever-agent optionator
argparse forever-monitor parseurl
asn1 form-data passport
assert formidable passport-local
assert-plus fresh path-is-absolute
async getobject pause
aws-sign glob peakle
aws-sign2 graceful-fs pend
balanced-match grunt pkginfo
base64-url grunt-contrib-jshint prelude-ls
bcrypt-nodejs grunt-contrib-nodeunit prompt
body-parser grunt-legacy-log ps-tree
boom grunt-legacy-log-utils punycode
brace-expansion grunt-legacy-util q
broadway handlebars qs
bson has-ansi range-parser
buffer-crc32 hawk raw-body
buffer-equal hoek read
buildmail hooker readable-stream
bytes http-errors repeat-string
camelcase http-signature request
center-align hyperquest resolve
chalk i revalidator
cli iconv-lite rewire
cliff inflight right-align
cliui inherits rimraf
clone ini sax
coa isarray send
coffee-script isstream shelljs
colors istanbul sigmund
combined-stream is-utf8 signal-exit
commander jshint smtp-connection
concat-map json-stringify-safe sntp
connect js-yaml source-map
connect-multiparty kerberos spawn-wrap
content-type kind-of sprintf-js
cookie lazy stack-trace
cookie-jar lcov-parse statuses
cookie-signature levn stream-counter
core-util-is libbase64 string_decoder
coveralls libmime stringstream
crc libqp strip-ansi
cryptiles lodash strip-bom
ctype log-driver supervisor
cycle longest supports-color
dateformat lru-cache svgo
debug media-typer tap
decamelize methods tap-mocha-reporter
deep-equal mime tap-parser
deep-is mime-db through2
delayed-stream mime-types timespan
depd minimatch tough-cookie
diff minimist tunnel-agent
director mkdirp type-check
duplexer2 mongodb type-is
ee-first mongodb-core uglify-js
es6-promise ms uid-safe
escape-string-regexp multiparty underscore
escodegen mute-stream underscore.string
esprima nan unicode-length
estraverse nconf unpipe
esutils ncp util
eventemitter2 nodemailer utile
events-to-array nodemailer-direct-transport utils-merge
event-stream nodemailer-smtp-transport watch
exit nodemailer-wellknown whet.extend
express nodeunit which
express-namespace node-uuid window-size
express-session nopt winston
eyes nssocket wordwrap
fast-levenshtein nyc wrappy
fd-slicer oauth-sign xtend
fileset once yargs

这可能是什么原因造成的?

感谢您的任何建议或帮助。

最佳答案

这是 NPM 2 和 NPM 3 之间的区别。NPM 3 会将依赖项的第一个版本作为对等项,并嵌套依赖项的其他版本。

我猜它看起来更丑,但占用的空间更少。

关于node.js - npm install 安装 package.json 中未指定的额外包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31467505/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com