DataV-Vue3 icon indicating copy to clipboard operation
DataV-Vue3 copied to clipboard

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

Open LouisLiu00 opened this issue 1 year ago • 1 comments

版本:

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.

LouisLiu00 avatar Jul 23 '24 05:07 LouisLiu00

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

KysonGod avatar Nov 14 '24 11:11 KysonGod