Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to handle redirect to download dynamodb_local #20

Open
anggras opened this issue Jan 3, 2018 · 2 comments
Open

Failed to handle redirect to download dynamodb_local #20

anggras opened this issue Jan 3, 2018 · 2 comments

Comments

@anggras
Copy link

anggras commented Jan 3, 2018

Current implementation does not cater for redirect, causing error when downloading dynamodb_local

/Users/anggra/Documents/Work/web/testing/node_modules/dynamodb-localhost/dynamodb/installer.js:23
                throw new Error('Error getting DynamoDb local latest tar.gz location ' + response.headers.location + ': ' + response.statusCode);
                ^

Error: Error getting DynamoDb local latest tar.gz location http://103.1.138.149/s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz: 302
    at ClientRequest.<anonymous> (/Users/anggra/Documents/Work/web/testing/node_modules/dynamodb-localhost/dynamodb/installer.js:23:23)
    at Object.onceWrapper (events.js:291:19)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:189:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:522:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at Socket.socketOnData (_http_client.js:411:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:189:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:551:20)

I've created a fix at https://github.com/anggras/dynamodb-localhost/tree/handle-redirect
Please let me know if it is acceptable

@muriloamendola
Copy link

I've fixed this problem too: #41

@domdomegg
Copy link

FYI: This package (dynamodb-localhost) doesn't appear to be maintained, with no new releases to NPM in over 4 years.

Solution: You can use aws-dynamodb-local, a maintained fork, instead. (Disclaimer: I am a contributor to this fork). It is a drop-in replacement for this package, and is updated to fix this bug.

Migrating takes about 2 minutes, with a full guide in the README. Of course, it's all still open-source and MIT licensed. Ownership of this new package sits with a registered charity, that is committed to maintaining the package into the future and is open to contributions from the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants