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

导入识别不了路径6:25:56 [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. #45

Open
lozn00 opened this issue Oct 20, 2023 · 9 comments

Comments

@lozn00
Copy link

lozn00 commented Oct 20, 2023

resolve entry for package "@dataview/datav-vue3". The package may have incorrect main/module/exports specified in its package.json.
16:25:56 [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.
Plugin: vite:import-analysis
image

@aboutZZ
Copy link

aboutZZ commented Oct 31, 2023

+1 同样的问题

@Abiel1024
Copy link

+1 同样的问题
"vite": "^4.4.9"

@5710xIa
Copy link

5710xIa commented Nov 14, 2023

同样的问题+1

@eiriksgata
Copy link

这个@dataview/datav-vue3 依赖 0.0.0-test.1672506674342 版本的package.json 中的 module 需要改为 "module": "./es/index.js" => "module": "./es/index.mjs" 当然 这边是不推荐直接改的,希望早点修复这个问题吧

@lozn00
Copy link
Author

lozn00 commented Nov 17, 2023

@eiriksgata 我用别人修改版了

@aboutZZ
Copy link

aboutZZ commented Nov 17, 2023

pnpm patch @dataview/datav-vue3

@ye17186
Copy link

ye17186 commented Nov 21, 2023

+1
大佬们有比较好的解决方案吗?

@newpanjing
Copy link

我fork了一个新的包,只是修复了这个错误。大家可以用这个:

yarn add @newpanjing/datav-vue3

然后使用方法还是一模一样,但是包的位置不一样了:

<script setup lang="ts">

import { BorderBox1 } from '@newpanjing/datav-vue3';
</script>

<template>
  <BorderBox1 style="width:200px;height:50px;" />
</template>

<style scoped>

</style>

要从这里导入:import { BorderBox1 } from '@newpanjing/datav-vue3';

源码的github地址:

https://github.com/newpanjing/DataV-Vue3

@mcx162101
Copy link

我也出现这个问题了,希望尽快修复吧

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

8 participants