question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin fails because of wrong installation path

See original GitHub issue

Actual Behaviour

Plugin silently failing at installation

sls dynamodb install

Expected Behaviour

Some feedback when it fails.

Steps to reproduce it

  • serverless 1.30.1
  • macOS High Sierra 10.13.4
  • Node v7.2.1
$ serverless create --template aws-python3 --path python-dynamo-tmp
...
$ npm install --save serverless-dynamodb-local
...
sls dynamodb install

Installing dynamodb does nothing.

This is my serverless.yml

service: python-dynamo-tmp

provider:
  name: aws
  runtime: python3.6

plugins:
  - serverless-dynamodb-local

LogCat for the issue

After several hours of a headache since I just started looking into serverless and I’m not a Node.js developer it occurred to me to search the code base for something and I landed on the utils.js inside $project_path/node_modules/dynamodb-localhost/dynamodb/ and I added console.log(.. to print out the absolute path of the installation folder since nothing was being created and nothing was being printed to the terminal, this was the output…

/Users/fcastellanos/Projects/serverless/python-dynamo-tmp/node_modules/dynamodb-localhost/dynamodb//Users/fcastellanos/Projects/serverless/python-dynamo-tmp/.dynamodb

Which was weird so what I did was to rewrite the absPath to just return the relPath parameter…

var absPath = function (relPath) {
    return relPath;
};

After that change I ran again the installation again but now successfully creating the .dynamodb directory in my project’s path, but now whenever I try to start the dynamodb service I get this…

$ sls dynamodb start
Dynamodb Local Started, Visit: http://localhost:8000/shell
Error: Unable to access jarfile DynamoDBLocal.jar
DynamoDB Local failed to start with code 1

I added a bunch more loggers all over the place and ended up in $project_path/node_modules/dynamodb-localhost/dynamodb/config.json where the install_path is just /bin so I changed it to…

{
    "setup": {
        "download_url": "http://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz",
        "install_path": "/Users/fcastellanos/Projects/serverless/python-dynamo-tmp/.dynamodb",
        "jar": "DynamoDBLocal.jar"
    },
    "start": {
        "port": 8000
    }
}

After making those changes everything works, I mean, I run sls dynamodb start without any errors and I can even go to http://localhost:8000/shell and see the DynamoDB Web Shell

Would you like to work on the issue?

I’m no node.js developer or serverless expert but I can help however I can.

Thanks!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:9

github_iconTop GitHub Comments

8reactions
kenleytomlincommented, Aug 20, 2018

@fcastellanos I found the same issue with serverless version 1.30.1 and serverless-dynamodb-local version 0.2.31.

Downgrading serverless-dynamodb-local to version 0.2.30 fixed the issue.

4reactions
Roustalskicommented, Jan 28, 2019

Visiting here from stack overflow. I have been on v0.2.35 with no problems until today with the release of 0.2.36. I am staying on 35 and watching this for resolution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin fails because of wrong installation path #181 - GitHub
I experienced this issue on v0.2.35 and downgrading to 0.2.30 fixed the issue. install and start were silently failing. Interestingly it did not ......
Read more >
Fix Installation Failed: Destination Folder Already Exists Error ...
In this tutorial, you can learn how to Fix Destination Folder Already Exists Error in WordPress using a free plugin from your WordPress ......
Read more >
How to Fix Installation Failed: Destination Folder Already Exists
It usually happens when a previous attempt to install or uninstall a theme or a plugin has failed, leaving behind an empty destination...
Read more >
How to Fix "Installation Failed: Could Not Create Directory"
This error is your server's way of saying you're not allowed to make changes to your site's files with the plugin or theme...
Read more >
How to Fix Destination Folder Already Exists Error in WordPress
Plugin install failed. The first thing that you should do is visit your themes or plugins page to see if you have it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found