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

Import library issue #4

Closed
razekteixeira opened this issue Jul 5, 2021 · 3 comments
Closed

Import library issue #4

razekteixeira opened this issue Jul 5, 2021 · 3 comments

Comments

@razekteixeira
Copy link

Hi there!

I'm having troubles trying to use the library.

Just installed it on both vuejs and react fresh projects, but it seems to fail when trying to import the library.
The package exists in the node_modules folder but it fails to import via

import Atropos from "atropos/react" or
import Atropos from "atropos/vue"

@razekteixeira
Copy link
Author

razekteixeira commented Jul 5, 2021

@nolimits4web

I was able to use it:

import Atropos from "atropos/react/atropos-react.esm";
instead of
import Atropos from "atropos/react";

And for css files the same

import "atropos/atropos.css";
instead of
import "atropos/css";

Should this be changed in the documentation?

@nolimits4web
Copy link
Owner

Hi! Documentation is correct, make sure your env supports ES modules and exports field in package.json

@razekteixeira
Copy link
Author

razekteixeira commented Jul 5, 2021

Ooops, my bad :) I was using node v12 for a specific project and it didn't support ES Modules and exports.

It just works, like a damn charm 😆🎉

Thanks for the hint!

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

2 participants