It seems like the issue is with the package's package.json file. You can try to specify the main file in the package.json file of the package you are trying to import.
For example, in the family-chart package, you can add the following line to the package.json file:
"main": "dist/family-chart.js"
This will tell Vite where to find the main file of the package.
If that doesn't work, you can try to import the package using the full path to the main file:
import FamilyChart from 'family-chart/dist/family-chart.js';
For the dTree package, it seems like there is an issue with the d3 dependency. You can try to install d3 separately and import it in your component:
import * as d3 from 'd3';
import dTree from 'dtree';
This should resolve the issue with the d3 dependency.
If none of these solutions work, you can try to reach out to the package maintainers for support.