Closed tomchiverton closed 2 years ago
My test script is like
rm -rf node_modules* ; npm i ; sls package ; ls -laht .serverless/*zip
edit the package.json & re run,
-rw-rw-r-- 1 tchiverton tchiverton 45M Apr 8 11:08 .serverless/patientpass-queue-processor.zip
-vs-
-rw-rw-r-- 1 tchiverton tchiverton 150K Apr 8 11:07 .serverless/patientpass-queue-processor.zip
package.json before adding:
{
"name": "demo",
"version": "1.0.0",
"description": "",
"main": "handler.js",
"dependencies": {
"axios": "^0.21.1",
"moment": "^2.29.1",
"uuid": "^8.3.2"
}
}
The node_modules folder is what grows.
Before :
$ du -skh node_modules/*|sort -h
44K node_modules/follow-redirects
312K node_modules/uuid
480K node_modules/axios
5.1M node_modules/moment
The list after adding the plugin package is huge, now includes the aws-sdk, for instance (!)
12K node_modules/buffer-alloc
12K node_modules/buffer-alloc-unsafe
12K node_modules/buffer-fill
12K node_modules/set-immediate-shim
12K node_modules/@tokenizer
16K node_modules/ansi-regex
16K node_modules/aproba
16K node_modules/at-least-node
16K node_modules/buffermaker
16K node_modules/clone-response
16K node_modules/code-point-at
16K node_modules/colorspace
16K node_modules/core-util-is
16K node_modules/dir-glob
16K node_modules/duplexer3
16K node_modules/end-of-stream
16K node_modules/es6-promisify
16K node_modules/ext-list
16K node_modules/ext-name
16K node_modules/filename-reserved-regex
16K node_modules/has-unicode
16K node_modules/ieee754
16K node_modules/inflight
16K node_modules/is-extglob
16K node_modules/is-fullwidth-code-point
16K node_modules/is-stream
16K node_modules/json-cycle
16K node_modules/lodash.isobject
16K node_modules/lodash.isplainobject
16K node_modules/lodash.isstring
16K node_modules/merge2
16K node_modules/mimic-response
16K node_modules/ms
16K node_modules/mute-stream
16K node_modules/number-is-nan
16K node_modules/object-assign
16K node_modules/once
16K node_modules/os-homedir
16K node_modules/os-tmpdir
16K node_modules/path-is-absolute
16K node_modules/path-key
16K node_modules/p-finally
16K node_modules/pify
16K node_modules/pinkie-promise
16K node_modules/prepend-http
16K node_modules/process-nextick-args
16K node_modules/resolve-alpn
16K node_modules/responselike
16K node_modules/run-async
16K node_modules/run-parallel
16K node_modules/run-parallel-limit
16K node_modules/shebang-command
16K node_modules/shebang-regex
16K node_modules/simple-swizzle
16K node_modules/sort-keys-length
16K node_modules/string-width
16K node_modules/strip-ansi
16K node_modules/strip-dirs
16K node_modules/to-readable-stream
16K node_modules/universalify
16K node_modules/url-parse-lax
16K node_modules/which-pm-runs
16K node_modules/wide-align
16K node_modules/wrappy
16K node_modules/yeast
20K node_modules/anymatch
20K node_modules/array-union
20K node_modules/balanced-match
20K node_modules/bindings
20K node_modules/brace-expansion
20K node_modules/buffer-crc32
20K node_modules/camelcase
20K node_modules/chownr
20K node_modules/cli-cursor
20K node_modules/color-name
20K node_modules/color-string
20K node_modules/component-emitter
20K node_modules/defer-to-connect
20K node_modules/essentials
20K node_modules/fs-constants
20K node_modules/get-stdin
20K node_modules/has
20K node_modules/has-flag
20K node_modules/inherits
20K node_modules/ini
20K node_modules/is-binary-path
20K node_modules/is-glob
20K node_modules/is-interactive
20K node_modules/is-natural-number
20K node_modules/is-number
20K node_modules/is-promise
20K node_modules/is-typedarray
20K node_modules/is-unicode-supported
20K node_modules/is-wsl
20K node_modules/lowercase-keys
20K node_modules/methods
20K node_modules/mimic-fn
20K node_modules/nested-error-stacks
20K node_modules/nice-try
20K node_modules/normalize-path
20K node_modules/onetime
20K node_modules/optional
20K node_modules/path-type
20K node_modules/pend
20K node_modules/pinkie
20K node_modules/p-timeout
20K node_modules/quick-lru
20K node_modules/registry-url
20K node_modules/restore-cursor
20K node_modules/set-blocking
20K node_modules/slash
20K node_modules/supports-color
20K node_modules/text-hex
20K node_modules/to-array
20K node_modules/untildify
20K node_modules/utils-merge
24K node_modules/base64-arraybuffer
24K node_modules/base64-js
24K node_modules/cachedir
24K node_modules/cli-boxes
24K node_modules/compress-brotli
24K node_modules/cookiejar
24K node_modules/defaults
24K node_modules/delayed-stream
24K node_modules/env-variable
24K node_modules/expand-template
24K node_modules/fill-range
24K node_modules/fs-minipass
24K node_modules/imurmurhash
24K node_modules/indexof
24K node_modules/is-docker
24K node_modules/isomorphic-ws
24K node_modules/json-buffer
24K node_modules/kuler
24K node_modules/lodash.flatten
24K node_modules/lodash.upperfirst
24K node_modules/log-symbols
24K node_modules/media-typer
24K node_modules/merge
24K node_modules/mkdirp
24K node_modules/napi-build-utils
24K node_modules/parseqs
24K node_modules/queue-microtask
24K node_modules/readable-web-to-node-stream
24K node_modules/signal-exit
24K node_modules/simple-concat
24K node_modules/stack-trace
24K node_modules/stream-shift
24K node_modules/string_decoder
24K node_modules/@szmarczak
24K node_modules/throat
24K node_modules/to-buffer
24K node_modules/urlencode
24K node_modules/util-deprecate
24K node_modules/webidl-conversions
24K node_modules/write-file-atomic
28K node_modules/2-thenable
28K node_modules/after
28K node_modules/binary-extensions
28K node_modules/clone
28K node_modules/combined-stream
28K node_modules/component-bind
28K node_modules/concat-map
28K node_modules/console-control-strings
28K node_modules/crc32-stream
28K node_modules/deep-extend
28K node_modules/enabled
28K node_modules/fs.realpath
28K node_modules/get-stream
28K node_modules/glob-parent
28K node_modules/immediate
28K node_modules/mime-types
28K node_modules/minizlib
28K node_modules/one-time
28K node_modules/parseuri
28K node_modules/p-cancelable
28K node_modules/pump
28K node_modules/readdir-glob
28K node_modules/registry-auth-token
28K node_modules/split2
28K node_modules/tunnel-agent
28K node_modules/typedarray-to-buffer
28K node_modules/xtend
28K node_modules/zip-stream
32K node_modules/ansi-styles
32K node_modules/arraybuffer.slice
32K node_modules/backo2
32K node_modules/buffers
32K node_modules/builtin-modules
32K node_modules/component-inherit
32K node_modules/content-disposition
32K node_modules/delegates
32K node_modules/denque
32K node_modules/detect-libc
32K node_modules/dijkstrajs
32K node_modules/dotenv-expand
32K node_modules/has-binary2
32K node_modules/has-cors
32K node_modules/isarray
32K node_modules/keyv
32K node_modules/lodash.defaults
32K node_modules/noop-logger
32K node_modules/normalize-url
32K node_modules/npmlog
32K node_modules/readdirp
32K node_modules/replaceall
32K node_modules/sort-keys
32K node_modules/strip-outer
32K node_modules/tencent-serverless-http
32K node_modules/to-regex-range
32K node_modules/trim-repeated
32K node_modules/type-is
32K node_modules/wcwidth
32K node_modules/yallist
36K node_modules/cacheable-lookup
36K node_modules/ci-info
36K node_modules/duplexify
36K node_modules/fastest-levenshtein
36K node_modules/filenamify
36K node_modules/isexe
36K node_modules/jsonfile
36K node_modules/lru-queue
36K node_modules/native-promise-only
36K node_modules/p-event
36K node_modules/simple-get
36K node_modules/tmp
36K node_modules/uni-global
40K node_modules/cli-width
40K node_modules/decompress-response
40K node_modules/exec-sh
40K node_modules/figures
40K node_modules/file-uri-to-path
40K node_modules/globby
40K node_modules/next-tick
40K node_modules/querystring
40K node_modules/reusify
40K node_modules/stream-promise
44K node_modules/archive-type
44K node_modules/cli-spinners
44K node_modules/color-convert
44K node_modules/decompress-tarbz2
44K node_modules/decompress-targz
44K node_modules/extend
44K node_modules/fast-deep-equal
44K node_modules/flat
44K node_modules/follow-redirects
44K node_modules/http-cache-semantics
44K node_modules/json-schema-traverse
44K node_modules/lodash.difference
44K node_modules/lodash.union
44K node_modules/minimatch
44K node_modules/safe-buffer
44K node_modules/side-channel
44K node_modules/through
48K node_modules/call-bind
48K node_modules/crc-32
48K node_modules/decompress
48K node_modules/fd-slicer
48K node_modules/minipass
48K node_modules/node-dir
48K node_modules/peek-readable
48K node_modules/punycode
52K node_modules/github-from-package
52K node_modules/graceful-fs
52K node_modules/triple-beam
52K node_modules/watch
56K node_modules/child-process-ext
56K node_modules/find-requires
56K node_modules/has-symbols
56K node_modules/https-proxy-agent
56K node_modules/open
56K node_modules/safe-stable-stringify
60K node_modules/agent-base
60K node_modules/cli-progress-footer
60K node_modules/dotenv
60K node_modules/engine.io-parser
60K node_modules/form-data
60K node_modules/ignore
60K node_modules/lru-cache
60K node_modules/safer-buffer
60K node_modules/token-types
60K node_modules/xml2js
64K node_modules/emoji-regex
64K node_modules/function-bind
64K node_modules/get-intrinsic
64K node_modules/lodash.merge
64K node_modules/micromatch
64K node_modules/prebuild-install
68K node_modules/decompress-unzip
68K node_modules/duration
68K node_modules/external-editor
68K node_modules/glob
68K node_modules/is-arrayish
68K node_modules/rc
68K node_modules/sprintf-kit
68K node_modules/tslib
72K node_modules/archiver
72K node_modules/chalk
72K node_modules/compress-commons
72K node_modules/fast-json-stable-stringify
72K node_modules/log-node
72K node_modules/mime
72K node_modules/whatwg-url
76K node_modules/blob
76K node_modules/braces
76K node_modules/colornames
76K node_modules/debug
76K node_modules/formidable
76K node_modules/jwt-decode
76K node_modules/promise-queue
76K node_modules/retry
76K node_modules/sax
76K node_modules/@sindresorhus
76K node_modules/yauzl
80K node_modules/cacheable-request
80K node_modules/es6-weak-map
80K node_modules/fastq
80K node_modules/sprintf-js
80K node_modules/xmlhttprequest-ssl
84K node_modules/asynckit
84K node_modules/@kwsites
84K node_modules/lie
88K node_modules/colors
88K node_modules/event-emitter
88K node_modules/http2-wrapper
88K node_modules/process-utils
92K node_modules/@colors
92K node_modules/timers-ext
92K node_modules/winston-transport
96K node_modules/filesize
96K node_modules/minimist
96K node_modules/strtok3
100K node_modules/ansi-align
100K node_modules/chardet
100K node_modules/chokidar
100K node_modules/color
100K node_modules/es6-symbol
100K node_modules/jmespath
100K node_modules/widest-line
100K node_modules/wrap-ansi
104K node_modules/commander
104K node_modules/es6-iterator
104K node_modules/events
104K node_modules/file-type
108K node_modules/log
112K node_modules/picomatch
116K node_modules/cli-sprintf-format
116K node_modules/make-dir
116K node_modules/@tencent-sdk
128K node_modules/cli-color
140K node_modules/memoizee
140K node_modules/node-abi
140K node_modules/seek-bzip
144K node_modules/chainsaw
144K node_modules/traverse
148K node_modules/adm-zip
156K node_modules/qrcode-terminal
160K node_modules/fecha
160K node_modules/socket.io-parser
164K node_modules/ajv-keywords
164K node_modules/cross-spawn
164K node_modules/dot-qs
164K node_modules/gauge
164K node_modules/node-fetch
164K node_modules/shortid
164K node_modules/ws
168K node_modules/binary
168K node_modules/diagnostics
168K node_modules/serverless-plugin-aws-alerts
168K node_modules/xmlbuilder
180K node_modules/readable-stream
184K node_modules/argparse
184K node_modules/object-inspect
196K node_modules/url
204K node_modules/esniff
208K node_modules/fs2
216K node_modules/mime-db
220K node_modules/fs-extra
220K node_modules/long
224K node_modules/ext
224K node_modules/inquirer
236K node_modules/tar-stream
244K node_modules/es6-set
244K node_modules/unbzip2-stream
248K node_modules/archiver-utils
248K node_modules/fast-glob
252K node_modules/semver
256K node_modules/ncjsm
256K node_modules/qs
260K node_modules/are-we-there-yet
260K node_modules/@nodelib
264K node_modules/lazystream
264K node_modules/ora
272K node_modules/logform
272K node_modules/tr46
276K node_modules/ansi-escapes
292K node_modules/tar
296K node_modules/bl
308K node_modules/@protobufjs
312K node_modules/uuid
320K node_modules/type-fest
324K node_modules/esprima
332K node_modules/boxen
352K node_modules/type
364K node_modules/decompress-tar
364K node_modules/path-loader
372K node_modules/buffer
396K node_modules/iconv-lite
400K node_modules/path2
412K node_modules/deferred
420K node_modules/got
424K node_modules/tar-fs
476K node_modules/js-yaml
480K node_modules/axios
480K node_modules/d
488K node_modules/engine.io-client
508K node_modules/nan
528K node_modules/graphlib
584K node_modules/uri-js
612K node_modules/package-json
708K node_modules/bluebird
764K node_modules/superagent
836K node_modules/pako
848K node_modules/yaml-ast-parser
856K node_modules/snappy
988K node_modules/yamljs
1008K node_modules/jszip
1.1M node_modules/ajv
1.1M node_modules/async
1.3M node_modules/simple-git
1.3M node_modules/winston
1.5M node_modules/kafka-node
1.7M node_modules/socket.io-client
1.9M node_modules/dayjs
1.9M node_modules/es5-ext
2.1M node_modules/prettyoutput
3.1M node_modules/ramda
3.7M node_modules/json-refs
4.2M node_modules/simple-hl7
4.9M node_modules/lodash
5.1M node_modules/moment
5.4M node_modules/@types
6.7M node_modules/protobufjs
7.7M node_modules/serverless
12M node_modules/rxjs
17M node_modules/inquirer-autocomplete-prompt
20M node_modules/tabtab
49M node_modules/@serverless
73M node_modules/aws-sdk
This is a Bug Report
Description
Take a small project.
sls package
is around 1.5 megAdd
"serverless-plugin-aws-alerts": "^1.7.4"
to package.json dependencies,sls package
is now creating a 40 meg .zipAdding a simple-ish plugin should not bring in 40 meg of stuff.
Additional Data