99x / dynamodb-localhost

Dynamodb localhost runner for development and testing
MIT License
35 stars 92 forks source link

localPath #25

Open aaalsubaie opened 6 years ago

aaalsubaie commented 6 years ago

installing new DyanamoDB does not add the local path in the path.

I have to assign localpath to "bin" in order to install the database.

[ '-Djava.library.path=/Users/aaalsubaie/Projects/propman-server/node_modules/dynamodb-localhost/dynamodb//bin/DynamoDBLocal_lib', '-jar', 'DynamoDBLocal.jar', '-port', 8000 ]

this might be the source of the problem: db_dir = utils.absPath(config.setup.install_path)

felixjung commented 6 years ago

I think this bug is actually fixed on the master branch. I was having a similar issue and fixed them inside the package in my node_modules folder. Later I saw that the master branch is already fixed, but no version has been released to npm.

felixjung commented 6 years ago

Actually, version 0.0.6 was just released, today. For me everything works as expected, now. I am using serverless-dynamodb-local, which depends on dynamodb-localhost. While serverless-dynamodb-local has not been updated to use version 0.0.6, I was able to force dependency resolution to this version via yarn's selective dependency resolution feature.

qtiki commented 6 years ago

Not sure if this is related but in our environment upgrading from version 0.0.5 to 0.0.6 actually breaks serverless-dynamodb-local plugin. It causes the serverless command to fail with Error: spawn java ENOENT.

Setting this to our package.json fixes the problem:

  "resolutions": {
    "dynamodb-localhost": "0.0.5"
  },

Other related package versions: serverless-offline@3.25.9 serverless-dynamodb-local@0.2.33

uccmen commented 5 years ago

@qtiki - that's exactly what I did as well - https://github.com/99xt/serverless-dynamodb-local/issues/210#issuecomment-486056382