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

Is it possible to use in Nuxt.js #138

Open
mathxlee opened this issue Jul 15, 2023 · 6 comments
Open

Is it possible to use in Nuxt.js #138

mathxlee opened this issue Jul 15, 2023 · 6 comments

Comments

@mathxlee
Copy link

mathxlee commented Jul 15, 2023

Hi team,
I tried to install the package like this:
yarn add @worldcoin/idkit

and then import and init it:

import * as idkit from '@worldcoin/idkit' // If you installed the JS package as a module

idkit.init('idkit-container', {
	enable_telemetry: true,
	app_id: 'app_BPZsRJANxct2cZxVRyh80SFG', // obtain this from developer.worldcoin.org
	action: 'your_signal',
	onSuccess: result => console.log(result),
})

but i got tons of errors from the node_modules:

ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 214:46-59
Can't import the named export 'Branch' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 101:7-22
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs 22:4-12
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 12:26-41
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 21:20-35
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 21:66-81
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 42:11-26
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 42:49-64
Can't import the named export 'Children' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs 8:30-45
Can't import the named export 'Component' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 249:42-65
Can't import the named export 'DismissableLayer' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 243:104-121
Can't import the named export 'FocusScope' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 412:46-61
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 553:137-152
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 243:46-61
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs 97:36-50
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs 156:32-46
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-slot/dist/index.mjs 48:46-61
Can't import the named export 'Fragment' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 551:67-80
Can't import the named export 'Portal' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 103:46-59
Can't import the named export 'Portal' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 289:46-61
Can't import the named export 'Presence' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 101:81-96
Can't import the named export 'Presence' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 119:62-77
Can't import the named export 'Presence' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 157:46-61
Can't import the named export 'Presence' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 234:42-58
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 429:42-58
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 560:46-62
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 572:46-62
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 609:42-58
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-toast/dist/index.mjs 621:46-62
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 75:46-62
Can't import the named export 'Primitive' from non EcmaScript module (only default export is available)
ERROR in ./node_modules/@radix-ui/react-dialog/dist/index.mjs 139:42-58

...

and there are a lot...

any help will be appreciated.

@m1guelpf
Copy link
Member

Are you setting "type": "module" in your package.json?

@mathxlee
Copy link
Author

mathxlee commented Jul 26, 2023

Are you setting "type": "module" in your package.json?

Yes, we have, but still got the same errors and not working.

@m1guelpf
Copy link
Member

m1guelpf commented Aug 14, 2023

I think using import idkit from '@worldcoin/idkit/build/idkit-js' instead of import * as idkit should work

@btboy12
Copy link

btboy12 commented Aug 17, 2023

Does this library support Vue? It looks like it only supports reactjs.

@Yokymia32
Copy link

❤️

@vinayakkulkarni
Copy link

I am currently working on adding Vue support – https://github.com/vinayakkulkarni/idkit-js/tree/feat/add-vue-support

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

6 participants
@mathxlee @btboy12 @vinayakkulkarni @m1guelpf @Yokymia32 and others