🐛 [Bug]: Failed to resolve entry for package "@opentiny/vue". and Failed to resolve import "./component.js" from "....\packages\theme\src\theme\smb-theme\index.js". Does the file exist?
Version
@opentiny/[email protected]
Vue Version
Link to minimal reproduction
[ERROR] Failed to resolve entry for package "@opentiny/vue". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
src/main.ts:5:24:
5 │ import { Loading } from '@opentiny/vue'
[vite] Internal server error: Failed to resolve import "./component.js" from "....\packages\theme\src\theme\smb-theme\index.js". Does the file exist?
Plugin: vite:import-analysis
File: D:/download-browser/tiny-vue-dev1/tiny-vue-dev/packages/theme/src/theme/smb-theme/index.js:454:16
452| }
453|
454| export * from './component.js'
| ^
455|
Step to reproduce
从github上拉取dev分支代码进行pnpm i拉取依赖,使用pnpm dev运行出现以上错误
What is expected
No response
What is actually happening
[ERROR] Failed to resolve entry for package "@opentiny/vue". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
src/main.ts:5:24:
5 │ import { Loading } from '@opentiny/vue'
[vite] Internal server error: Failed to resolve import "./component.js" from "....\packages\theme\src\theme\smb-theme\index.js". Does the file exist?
Plugin: vite:import-analysis
File: D:/download-browser/tiny-vue-dev1/tiny-vue-dev/packages/theme/src/theme/smb-theme/index.js:454:16
452| }
453|
454| export * from './component.js'
| ^
455|
What is your project name
Tinyvue
Any additional comments (optional)
No response
@Noospic pnpm dev 命令实际执行了三个命令:
"dev": "pnpm build:entry && gulp themeConcat -w & pnpm -C examples/vue3 dev",
看你的报错应该是第二个生成主题文件的命令执行报错了,可以尝试单独执行该命令:
gulp themeConcat -w
Bot detected the issue body's language is not English, translate it automatically.
@Noospic The pnpm dev command actually executes three commands:
"dev": "pnpm build:entry && gulp themeConcat -w & pnpm -C examples/vue3 dev",
It seems that your error report is caused by the second command to generate the theme file. You can try to execute this command separately:
gulp themeConcat -w