Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"sls dynamodb start" throws spawn java ENOENT

running on Mac, I've created a basic serverless service using the aws-nodejs template:

serverless create --template aws-nodejs --path TestService

After that I used the following commands to add serverless local:

npm install serverless-dynamodb-local
serverless dynamodb install

No matter what I do, I can't get dynamodb-local to start. When I run

serverless dynamodb start

I get the following error:

Error: spawn java ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Running java --version gives me the following info:

Java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

I'm using Node 8.11.4 with serverless 1.30.1. Aws-sdk is also installed and I've setup my profile.

Thanks

like image 773
Nahum Bazes Avatar asked Aug 20 '18 07:08

Nahum Bazes


1 Answers

Apparently there is a bug with version [email protected].

issue on github

I've downgraded to version 0.2.30 by using

npm uninstall serverless-dynamodb-local
sls dynamodb uninstall

npm install [email protected]
sls dynamodb install
like image 89
Nahum Bazes Avatar answered Oct 19 '22 13:10

Nahum Bazes