serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
serverless dynamodb install fails
Node version: 6.10.30 Yarn version: 0.27.5 Serverless version: 1.20.2
serverless-dynamodb-local version: 1.0.0
Seems related to previous isses https://github.com/99xt/serverless-dynamodb-local/issues/70 & https://github.com/99xt/serverless-dynamodb-local/issues/65.
Here is the stacktrace:
$ sls dynamodb install
Error: Error getting DynamoDb local latest tar.gz location: 307
at ClientRequest.<anonymous> (/Users/daviskoh/project/node_modules/dynamodb-localhost/dynamodb/installer.js:14:26)
at ClientRequest.g (events.js:292:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:362:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
_http_client.js:54
throw new Error('Protocol "' + protocol + '" not supported. ' +
^
Error: Protocol "https:" not supported. Expected "http:"
at new ClientRequest (_http_client.js:54:11)
at Object.exports.request (http.js:31:10)
at Object.exports.get (http.js:35:21)
at ClientRequest.<anonymous> (/Users/daviskoh/project/node_modules/dynamodb-localhost/dynamodb/installer.js:16:18)
at ClientRequest.g (events.js:292:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:362:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
error Command failed with exit code 1.
Is this another issue w/ the dependency https://github.com/99xt/dynamodb-localhost?
@daviskoh We will look into this issue soon. CC @lakindu95
Hi daviskoh,
Did you install all the dependencies? Check the link below which might help. https://github.com/99xt/serverless-dynamodb-local/blob/v1/.travis.yml
Dont think installing dependencies directly would seem to have anything to do with this issue as older versions of this pkg installs its dependencies fine and changing that would be an odd requirement for a pkg.
It looks like it has more to do w/ perhaps AWS changing the response & request requirements to download the tar.gz file as the 0.2.24 version is able to install the latest dynamodb fine w/ the latest "dynamodb-localhost": "^0.0.5" as a dependency.
Rather it seems to be that when installing serverless-dynamodb-local 1.0.0, it seems to point to "dynamodb-localhost": "0.0.2" which has a different /dynamodb/installer.js file:
http.get(downloadUrl, function (response) {
if (302 != response.statusCode) {
callback(new Error('Error getting DynamoDb local latest tar.gz location: ' + response.statusCode));
}
http.get(response.headers.location, function (redirectResponse) {
var len = parseInt(redirectResponse.headers['content-length'], 10),
bar = new ProgressBar('Downloading dynamodb-local [:bar] :percent :etas', {
complete: '=',
incomplete: ' ',
width: 40,
total: len
});
if (200 != redirectResponse.statusCode) {
throw new Error('Error getting DynamoDb local latest tar.gz location ' + response.headers.location + ': ' + redirectResponse.statusCode);
}
...
which differs from 0.0.5
Perhaps this somehow has to do w/ tagging releases? The v1 branch has the latest version as 0.2.24, but the latest tag is 1.0.0.
Also, the dynamodb-localhost doesnt seem to have any release tags at all...
nvm...
sls dynamodb install on "serverless-dynamodb-local": "0.2.24" fails as well...
Same.
Solved by yarn add [email protected]
sls dynamodb install on "serverless-dynamodb-local": "^0.2.30" is failing too with error:
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
sls dynamodb install fails every time it tries to download the jar. "serverless-dynamodb-local": "^0.2.35"
C:\Code\Workspace\cmchecklist\api\node_modules\dynamodb-localhost\dynamodb\installer.js:24
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 undefined: 407
at ClientRequest.
Is there an update on this? I'm experiencing the same issue over a year after the original post was made. I don't know what I'm supposed to do in order to move forward.
Edit config.json, "download_url" change to https.
this worked for me. I wonder why the hack nobody has ever fixed this. I just lost many hour because of it