Importing the @zitadel/client into my CommonJS project doesn't work
I get the following error:
I saw some other conversation about this, but it's not super clear to me what the conclusion was - it seems like some code was merged into the package.
@zitadel/* are both version 1.3.1
I'll drop my tsconfig in here for reference:
Thanks in advance for any help
5 Replies
hey @Oscar thanks for your question, I will take a look and get back to you.
hey @Oscar good day, this has been raised internally, will get back to you
Cheers - What sort of timeline can I expect here? Vague is fine, but I'll need to plan my work around it
hey @Oscar checking with the team now
I think that this line: https://github.com/zitadel/zitadel/blob/4dad13cbcd0fb4746e4bdbf1e317bde9aecd968f/packages/zitadel-proto/buf.gen.yaml#L18 should be
- import_extension=cjs
(instead of =js
, because the package defaults .js files to be treated as esm)
I'll have to set the repo up to test this though, which I'm a bit adverse too (given I'm a bit tight on time) - but might be useful to whomever picks this up (alternatively I find some free time and do it myself)hey @Oscar our front end engineers are busy atm wiuth other tasks, if someone sees this and wants to pick it up, please feel free 🙂
alternatively, it would be nice if you can create an issue for this, you already have the fix tho, this can go onto description(if you cannot do it), regardless, please lmk