You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[vite:dep-pre-bundle] Failed to resolve entry for package "@ant-design/colors". The package may have incorrect main/module/exports specified in its package.json.
#2883
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Provide a description in this issue that describes the bug.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
不能启动 vite 开发模式,报错如下。
我使用的是 pnpm,切换到 yarn 就不报错了。
我检查过这几个报错的库,里面的main/module/exports 指向是正确的,唯一不同的是,这些库我不直接使用,而是我使用 antd 的时候,antd 依赖了这些库。
会是因为 pnpm 的目录链接关系?导致 vite 找不到正确的路径从而报错吗? 我不知道这是 pnpm 的问题,还是说 vite 需要特殊操作来兼容 pnpm 的 node_modules 目录结构?因为这些被依赖的库被安装在了.pnpm 目录下,再链接 到相应地方的,而不是直接在 node_modules 目录下。
当前我只能将 pnpm 切换 到 yarn,临时救急。
Reproduction
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: pnpm
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: