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

构建错误:没有找到包!(error during build: Cannot find package !) #411

Open
3 tasks done
xsbcme opened this issue Feb 7, 2025 · 0 comments
Open
3 tasks done

Comments

@xsbcme
Copy link

xsbcme commented Feb 7, 2025

Describe the bug

failed to load config from D:\Projects\Zy\hazardous-waste\hazardous-waste-view\medical-waste-view\packages\enum\vite.config.ts error during build: Error: Cannot find package 'D:\Projects\Zy\hazardous-waste\hazardous-waste-view\medical-waste-view\node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected][email protected]_@types+n_ksjt42kfpzeg6bccpbhywycbpm\node_modules\@microsoft\api-extractor\lib\index.js' imported from D:\Projects\Zy\hazardous-waste\hazardous-waste-view\medical-waste-view\node_modules\.pnpm\[email protected]_@[email protected][email protected][email protected][email protected]_@types+n_ksjt42kfpzeg6bccpbhywycbpm\node_modules\vite-plugin-dts\dist\index.mjs Did you mean to import "@microsoft/api-extractor/lib/index.js"? at legacyMainResolve (node:internal/modules/esm/resolve:215:26) at packageResolve (node:internal/modules/esm/resolve:841:14) at moduleResolve (node:internal/modules/esm/resolve:927:18) at defaultResolve (node:internal/modules/esm/resolve:1169:11) at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:542:12) at ModuleLoader.resolve (node:internal/modules/esm/loader:510:25) at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38) at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40) at link (node:internal/modules/esm/module_job:95:36)  ELIFECYCLE  Command failed with exit code 1.

Monorepo项目中使用Vite构建项目会出现此错误,排查后导致错误的原因是路径过长。
** This error occurs when building a project using Vite in the Monorepo project. The cause of the error is that the path is too long. **

Reproduction

none

Steps to reproduce

No response

System Info

Validations

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

1 participant