tiny-vue icon indicating copy to clipboard operation
tiny-vue copied to clipboard

🐛 [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?

Open Snnerney opened this issue 1 year ago • 2 comments

Version

@opentiny/[email protected]

Vue Version

[email protected]

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| 屏幕截图 2024-08-09 131434

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| 屏幕截图 2024-08-09 131434

What is your project name

Tinyvue

Any additional comments (optional)

No response

Snnerney avatar Aug 09 '24 05:08 Snnerney

@Noospic pnpm dev 命令实际执行了三个命令:

"dev": "pnpm build:entry && gulp themeConcat -w & pnpm -C examples/vue3 dev",

看你的报错应该是第二个生成主题文件的命令执行报错了,可以尝试单独执行该命令:

gulp themeConcat -w

kagol avatar Aug 10 '24 03:08 kagol

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

Issues-translate-bot avatar Aug 10 '24 03:08 Issues-translate-bot