claudiajs / claudia

Deploy Node.js projects to AWS Lambda and API Gateway easily
https://claudiajs.com
MIT License
3.8k stars 274 forks source link

Error when creating/uploading function #150

Closed frissonlabs closed 6 years ago

frissonlabs commented 6 years ago

I get the following error when running the "claudia create" command:

{ Error: "toString()" failed
    at Buffer.toString (buffer.js:495:11)
    at BinaryShape.encode64 (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\util.js:109:18)
    at translateScalar (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:53:16)
    at translate (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:16:21)
    at Object.<anonymous> (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:27:20)
    at Object.each (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\util.js:485:32)
    at translateStructure (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:22:8)
    at translate (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:13:30)
    at Object.<anonymous> (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\json\builder.js:27:20)
    at Object.each (C:\Users\David\AppData\Roaming\npm\node_modules\claudia\node_modules\aws-sdk\lib\util.js:485:32)
  message: '"toString()" failed',
  code: 'Error',
  time: 2018-04-16T04:49:23.463Z }

That was in Windows 10. I get the same error in an EC2 Linux instance:

{ Error: "toString()" failed
    at Buffer.toString (buffer.js:495:11)
    at BinaryShape.encode64 (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/util.js:109:18)
    at translateScalar (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:53:16)
    at translate (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:16:21)
    at Object.<anonymous> (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:27:20)
    at Object.each (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/util.js:485:32)
    at translateStructure (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:22:8)
    at translate (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:13:30)
    at Object.<anonymous> (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/json/builder.js:27:20)
    at Object.each (/home/ec2-user/.nvm/versions/node/v6.11.5/lib/node_modules/claudia/node_modules/aws-sdk/lib/util.js:485:32)
  message: '"toString()" failed',
  code: 'Error',
  time: 2018-04-16T05:58:49.164Z }

What's going on?

gojko commented 6 years ago

the stack here doesn't help much because it seems to be caused by aws-sdk/lib/util.js. can you create a minimal project that reproduces the issue and put it on github so we can investigate?

gojko commented 6 years ago

closing this due to lack of activity -- if you can produce a testable example, please reopen it