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

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

Open
LouisLiu00 opened this issue Jul 23, 2024 · 1 comment

Comments

@LouisLiu00
Copy link

版本:

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
Copy link

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

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