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

Using family-chart with Laravel 10 Vite + React #28

Closed
majster-pl opened this issue Apr 24, 2023 · 1 comment
Closed

Using family-chart with Laravel 10 Vite + React #28

majster-pl opened this issue Apr 24, 2023 · 1 comment

Comments

@majster-pl
Copy link

Hi, I'm working on family tree in my spare time and I come across your package which would work perfect for me but I having issue using it with above combination.
I wonder if you'll be able to help me resolve the problem?

When importing f3 as in your React example
import f3 from "family-chart"; // npm i family-chart
I get error:
[plugin:vite:import-analysis] Failed to resolve entry for package "family-chart". The package may have incorrect main/module/exports specified in its package.json.

I've asked for help laravel community but none of the suggestions worked so I thought I'll reach out to you.
Here is a link to post in laracasts forum.
https://laracasts.com/discuss/channels/vite/laravel-10-vite-react-problem-importing-npm-packages

Regards.

@majster-pl majster-pl changed the title Using with Laravel 10 Vite + React Using family-chart with Laravel 10 Vite + React Apr 24, 2023
@ed-fruty
Copy link

Found this library and got the same error during the first try.
So the fix is to change import path to the full one:

import f3 from "family-chart/dist/family-chart";

@donatso donatso closed this as completed Nov 16, 2023
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

3 participants