outsideris / citizen

A Private Terraform Module/Provider Registry
Mozilla Public License 2.0
625 stars 84 forks source link

Publishing provider with S3 storage fails - `TypeError: undefined is not a function\n at saveProvider` #73

Open dimisjim opened 3 years ago

dimisjim commented 3 years ago

hey there,

I have set the 2 required env vars for publishing on S3 (CITIZEN_AWS_S3_BUCKET with value the name of the bucket, CITIZEN_STORAGE with value "s3") + the service has the required permissions, but I get this error when trying to publish:

✖ publish my/provider/1.0.0
Duplicated (500)
undefined is not a function

The full in the logs:

{"level":50,"time":1628955452335,"pid":6,"hostname":"ip-some-internal-aws-hostname","name":"citizen","stack":"TypeError: undefined is not a function\n at saveProvider (/snapshot/citizen/storages/s3.js)\n at /snapshot/citizen/routes/providers.js\n at Array.map (<anonymous>)\n at Form.<anonymous> (/snapshot/citizen/routes/providers.js)","type":"Error","msg":"undefined is not a function"}

Any clue what I am doing wrong? It works fine with local storage, if I don't set these 2 env vars.

Hazurka commented 2 years ago

I face the same problem :)

trix32641 commented 2 years ago

When i built v0.4.0 i got the same error. When i use (git checkout 67ddf3f8676ac8504953d9d23d654c8652bcf3bf) version this error gone and i successfully uploaded provider zip file in citizen (S3).