Not sure where to start with this one so starting with Serverless. I have a ClojureScript app that runs on NodeJS. After creating a few Lambdas I have hit a point of not being able to build the project due to maxBuffer error:
Full debug message received:
15:46 $ SLS_DEBUG=* sls package -s samer
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Targeting /Users/skanjo/Projects/encompass-loan-sync/.serverless/enc-loan-sync.zip
Serverless: WARNING: Plugin ServerlessPlugin uses deprecated hook after:deploy:createDeploymentArtifacts,
use package:createDeploymentArtifacts hook instead
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Executing "lein update-in :cljs-lambda assoc :functions '[{:name "enc-loan-sync-loan-redis-samer" :invoke enc-loan-sync.loan-redis/handler} {:name "enc-loan-sync-loan-listener-samer" :invoke enc-loan-sync.loan-listener/handler} {:name "enc-loan-sync-loan-store-samer" :invoke enc-loan-sync.loan-store/handler} {:name "enc-loan-sync-loan-patches-reader-samer" :invoke enc-loan-sync.loan-reader/read-patches-handler} {:name "enc-loan-sync-loan-metadata-reader-samer" :invoke enc-loan-sync.loan-reader/read-metadata-handler} {:name "enc-loan-sync-loan-version-reader-samer" :invoke enc-loan-sync.loan-reader/read-loan-version-handler} {:name "enc-loan-sync-loan-reader-samer" :invoke enc-loan-sync.loan-reader/read-loan-handler}]' -- cljs-lambda build :output /Users/skanjo/Projects/encompass-loan-sync/.serverless/enc-loan-sync.zip :quiet"
Range Error [ E R R_ C H I L D_ P R O C E S S_ S T D I O_ M A X B U F F E R]
stderr maxBuffer length exceeded
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Stack Trace --------------------------------------------
RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
at Socket.onChildStderr (child_process.js:360:14)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:260:13)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:639:20)
From previous event:
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
at PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
at variables.populateService.then.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:157:33)
at runCallback (timers.js:693:18)
at tryOnImmediate (timers.js:664:5)
at processImmediate (timers.js:646:5)
at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
at Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:144:8)
at serverless.init.then (/usr/local/lib/node_modules/serverless/bin/serverless:43:50)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information -----------------------------
OS: darwin
Node Version: 10.9.0
Serverless Version: 1.30.0
Issue that seems to address my problem regarding webpack but I am not using webpack.
Here is the error from Node docs and it’s description, which confirms 4496 above.
https://nodejs.org/api/errors.html#errors_err_child_process_stdio_maxbuffer
ERR_CHILD_PROCESS_STDIO_MAXBUFFER##
Used when the main process is trying to read data from the child process’s STDERR/STDOUT, and the data’s length is longer than the maxBuffer option.
Is this familiar to anybody? I am new to NodeJS, ClojureScript, and Serverless so not really sure where to start trying to find the cause and how to correct. I was looking for a configuration I could change to solve the problem or locate source that may need to be changed to increase buffer size or event better a workaround.