Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at use the lib #1

Open
jefferson-docway opened this issue Jul 19, 2019 · 5 comments
Open

Error at use the lib #1

jefferson-docway opened this issue Jul 19, 2019 · 5 comments

Comments

@jefferson-docway
Copy link

jefferson-docway commented Jul 19, 2019

Hi, I'm trying to use, but it's generating an error

And the error is:
Total Layers Count: 29 Total Types : [ 'group', 'shape', 'text' ] Total Types Count: 3 TypeError: cb(...).rotateRight is not a function at Zeplin2react.checkLayers (/Users/Jeff/Desktop/node_modules/zeplin-to-react-native/src/zep2rn.js:227:49) at Zeplin2react.traceLayer (/Users/Jeff/Desktop/node_modules/zeplin-to-react-native/src/zep2rn.js:207:14) at /Users/Jeff/Desktop/node_modules/zeplin-to-react-native/src/zep2rn.js:98:30 at processTicksAndRejections (internal/process/task_queues.js:85:5)

Can you help me?

@sivarajng
Copy link
Owner

@jefferson-docway Hi jefferson, if possible can you add the design schema json or url, so that I can debug, so thinking your json schema might be little different, so I can update the code to handle the case. Thanks

@jefferson-docway
Copy link
Author

Yes, the code is:

const zep2RN = require('zeplin-to-react-native')

zep2RN.config({ dir: 'login', url: 'https://cdn.zeplin.io/5bc9dc51d99e651a9709281e/screens/5ce2a3a83355f82ab27b0d9f/versions/5ced34ce93a6f55a31c08ca0/snapshot/5ced34ce93a6f55a31c08ca1?Expires=1566075603&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uemVwbGluLmlvLzViYzlkYzUxZDk5ZTY1MWE5NzA5MjgxZS9zY3JlZW5zLzVjZTJhM2E4MzM1NWY4MmFiMjdiMGQ5Zi92ZXJzaW9ucy81Y2VkMzRjZTkzYTZmNTVhMzFjMDhjYTAvc25hcHNob3QvNWNlZDM0Y2U5M2E2ZjU1YTMxYzA4Y2ExIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTY2MDc1NjAzfX19XX0_&Signature=gM6R3qCTKtKU5RhWWF7R4AArsaJbI~seovANKtCik3FChUsoc4ekixy59l6HstLxOTZ0ptUqn9h-PB426KkVyQfyb2kKL4aYPiBQRIbzSYYfeaykEQFoocr~-fwADV~a0SjYK9m4L04uHVclu8NtmOCOVUdWPcdPyjI7Hh6nK5-91FHOKKCHG3MjUTDdMDMJcDJ43V-jP3J-pbfOH5vfB3fqNiKX4-V-YmTRglhK2VTGOtUARw3wWTH4Wd3IYAxZiW12ywv8Ld~Y4xSELrv-fNdmcYDvTlpI9iEuyXkDmIhv0XUmddFeUeBc8H9YL~VApXUUTtZ~YBBt1i4tnRxUzA__&Key-Pair-Id=APKAJKD6BRIMESUCGIPA' });

zep2RN.convert().then(res=>console.log(res)).catch(err=>console.log(err));

@dondell
Copy link

dondell commented Aug 19, 2020

I also have the same issue. Do we have solution for this already? Thanks

@myoganugraha
Copy link

any news ?

@cwchiu
Copy link

cwchiu commented Nov 19, 2020

I also have the same issue in v1.0.0.
But i modify zeplin-to-react-native\src\zep2rn.js (Ln225 ~ 227)

            if (isMatch) {

                let path = cb(i, destLayer, []).rotateRight(1)

to

            if (isMatch) {
		let ret = cb(i, destLayer, []);
		if(!Array.isArray(ret)){
			ret = [ret];
		}
                let path = ret.rotateRight(1)

i can convert success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants