Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ENOENT error when starting serverless offline

When running sls offline start I'm getting:

$ sls offline start
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn java ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)

My serverless.yml has:

plugins:
  - serverless-dynamodb-local
  - serverless-offline
  - serverless-mocha-plugin
like image 329
iaforek Avatar asked Oct 06 '17 14:10

iaforek


1 Answers

Run: sls dynamodb install first and then sls offline start. The error will not appear anymore.

Credits go to: https://github.com/serverless/serverless/issues/3247

like image 146
iaforek Avatar answered Oct 16 '22 06:10

iaforek