-
Notifications
You must be signed in to change notification settings - Fork 417
Open
Labels
Description
This is a Bug Report
Description
I'm in the process of trying to upgrade serverless-webpack
version from 2.2.3
, where I do not experience the following issue. Our serverless configuration has package: invididually: true
set, and about 40 functions. When I try to upgrade to a later version of serverless-webpack
and run sls webpack
, the build will run for about a minute and then I get the following error:
lambda:daniel.cottone $ npm run build
> [email protected] build /Users/daniel.cottone/Projects/expert-api/lambda
> sls webpack --stage dev
Serverless: Bundling with Webpack...
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
ts-loader: Using [email protected] and /Users/daniel.cottone/Projects/expert-api/lambda/tsconfig.json
<--- Last few GCs --->
[42611:0x104001600] 55964 ms: Mark-sweep 1405.7 (1508.8) -> 1405.7 (1508.8) MB, 1721.0 / 0.0 ms allocation failure GC in old space requested
[42611:0x104001600] 57889 ms: Mark-sweep 1405.7 (1508.8) -> 1405.5 (1487.3) MB, 1923.4 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1923 ms) last resort
[42611:0x104001600] 59801 ms: Mark-sweep 1405.5 (1487.3) -> 1405.4 (1486.8) MB, 1903.6 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x37341f01ba79 <JS Object>
1: set [native collection.js:~247] [pc=0x29d828934f21](this=0x332730f95301 <a Map with map 0x23d2df14319>,p=0x3dd499abec41 <String[11]: MediaSource>,x=0x2589b9b1c819 <a SymbolObject with map 0x399abfecde11>)
2: /* anonymous */(aka /* anonymous */) [/Users/daniel.cottone/Projects/expert-api/lambda/node_modules/typescript/lib/typescript.js:~23166] [pc=0x29d828ba5830](this=0x37341f002241 <...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [/usr/local/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
6: v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, v8::internal::JSMapIterator, 2>::Allocate(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [/usr/local/bin/node]
7: v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, v8::internal::JSMapIterator, 2>::Rehash(v8::internal::Handle<v8::internal::OrderedHashMap>, int) [/usr/local/bin/node]
8: v8::internal::Runtime_MapGrow(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
9: 0x29d827e840bd
10: 0x29d828934f21
11: 0x29d828ba5830
12: 0x29d827e86bbb
13: 0x29d828f85beb
Abort trap: 6
If I change my serverless config to not package individually, package: individually: false
then this error goes away. I have tested this with version 3.0.0
and the latest, 4.1.0
with the same results. Don't have this issue with 2.2.3
.
Additional Data
- Serverless-Webpack Version you're using: 4.1.0
- Webpack version you're using: 3.10.0
- Serverless Framework Version you're using: 1.24.0
- Operating System: macOS 10.12.6
- Stack Trace (if available): see above
BobbieBarker, abeyuya, jderose9, btg5679, johntellsall and 69 more