hardyscc / nestjs-dynamoose

Dynamoose module for Nest
MIT License
142 stars 24 forks source link

Endpoint URL must be a string, got object #720

Closed luizgomesdev closed 2 years ago

luizgomesdev commented 2 years ago

I'm trying make a POST on Users route and the repository throws the following error. I don't know what to do more.

Error:
EndpointError: Endpoint URL must be a string, got object
    at getEndpointUrl (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/getEndpointUrl.js:17:11)
    at evaluateEndpointRule (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js:26:50)
    at evaluateRules (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js:11:89)
    at evaluateTreeRule (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTreeRule.js:12:46)
    at evaluateRules (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js:20:81)
    at evaluateTreeRule (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTreeRule.js:12:46)
    at evaluateRules (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js:20:81)
    at evaluateTreeRule (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateTreeRule.js:12:46)
    at evaluateRules (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/utils/evaluateRules.js:20:81)
    at resolveEndpoint (/home/lipe/toro/poc-boilerplate-toro-serverless/node_modules/@aws-sdk/util-endpoints/dist-cjs/resolveEndpoint.js:26:48)

Repository: https://github.com/luizgomesdev/nestjs-dynamoose-serverless

NestJS version: 16.15.1 NestJS Dynamoose version: 0.5.0 Dynamoose version: 3.1.0

agborkowski commented 2 years ago

show ur config

luizgomesdev commented 2 years ago

show ur config

Every thing that I have is in repository. I don't omitted configs.

hardyscc commented 2 years ago

@luizgomesdev Please try out this sample project first to see if it's also work for u. https://github.com/hardyscc/aws-nestjs-starter

luizgomesdev commented 2 years ago

After trying several times, I found that for some reason, the new version of dynamoose forces you to enter valid credentials even if you have the local flag active. In previous versions it was not necessary.

@luizgomesdev Please try out this sample project first to see if it's also work for u. https://github.com/hardyscc/aws-nestjs-starter

Putting valid AWS credentials it woks fine. tks.