Closed fabiradi closed 2 years ago
@fabiradi Thanks for the issue. Good catch!
We changed this part with the last update. I think it's not working for some platforms because when we tested it and it was working for us.
I would really love a pr for this. Thanks again 🚀
When using
STORYBOOK_ZEPLIN_TOKEN
as env variable, the token is not working ("invalid"), although it is correct. When looking at the network tab (developer tools), one can see that the token is surrounded by"
(quotes). If you enter the same token using the UI, it works without a problem (no quotes around token).The most probably reason is a destructuring of the
process.env
, which seems to cause the problems.See https://github.com/mertkahyaoglu/storybook-zeplin/commit/cc4ff8d2ab206d87b66091ed878663ffdbdd13db#diff-8fa4b52909f895e8cda060d2035234e0a42ca2c7d3f8f8de1b35a056537bf199L6
When using
console.log(process.env)
, all strings appear like this:'"icGVyc29uYWxfYWNjZXNzX3Rva2"'
with double quotes. Destructuring "process.env" is not recommended:Suggestion