DataV-Team / DataV-Vue3

WIP: DataV Vue3 + Vite + TypeScript
https://datav-vue3.jiaminghi.com/
MIT License
386 stars 51 forks source link

The package may have incorrect main/module/exports specified in its package.json. #50

Open LouisLiu00 opened 4 months ago

LouisLiu00 commented 4 months ago

版本:

vue:^3.2.13 vite:^3.1.9

问题:

npm 安装过程没有问题,但是一旦我在 main.js 中引用 import DataV, { setClassNamePrefix } from '@dataview/datav-vue3'; 就会报错!

报错:

[vite] Internal server error: Failed to resolve entry for package "@dataview/datav-vue3". The package may have incorrect main/module/exports specified in its package.json.

KysonGod commented 1 week ago

npm时,package.json文件中的内容有误 image 将package.json中的这一句修改为"module":"./es/index.mjs" image 也就是第一张图中那个文件名后缀有错误