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

name too long #10868

Closed
xuguanqun opened this issue Mar 29, 2023 · 3 comments · Fixed by #10984
Closed

name too long #10868

xuguanqun opened this issue Mar 29, 2023 · 3 comments · Fixed by #10984

Comments

@xuguanqun
Copy link

pnpm start 启动项目时报错

error - Error: ENAMETOOLONG: name too long, open '.../node_modules/.cache/mfsu/mf-va__Users_lostdeer_Documents_xuguanqun_隐力科技_aismile-web-old_aismile-compatible_node_modules_.pnpm_registry.npmmirror.com+umi@4.0.63_@babel+core@7.21.3_@types+react@18.0.30_eslint@8.35.0_postc_c5ojm44bj3muyn6bfgjii3d3vy_node_modules_umi_client_client_plugin.js.js'
    at Object.openSync (node:fs:584:3)
    at writeFileSync (node:fs:2201:35)
    at DepBuilderInWorker.writeMFFiles (.../node_modules/.pnpm/registry.npmmirror.com+@umijs+preset-umi@4.0.63_@types+react@18.0.30_postcss@8.4.21_styled-co_wflebyz5isptna5vytv4hoplee/node_modules/@umijs/preset-umi/dist/commands/dev/depBuildWorker/depBuilder.js:145:35)
    at async DepBuilderInWorker.build (.../node_modules/.pnpm/registry.npmmirror.com+@umijs+preset-umi@4.0.63_@types+react@18.0.30_postcss@8.4.21_styled-co_wflebyz5isptna5vytv4hoplee/node_modules/@umijs/preset-umi/dist/commands/dev/depBuildWorker/depBuilder.js:118:7)
event - [Webpack] Compiled in 30394 ms (1437 modules)
wait  - [Webpack] Compiling...
@github-actions
Copy link

由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@fz6m fz6m reopened this Mar 29, 2023
@fz6m
Copy link
Member

fz6m commented Mar 29, 2023

提供一下当前电脑的 node 版本吧,可以试试升级 node 版本看看还有没有这个问题。

@fz6m
Copy link
Member

fz6m commented Mar 29, 2023

@stormslowly 可以看下这个问题,目前 mfsu cache 文件都是用的绝对路径,这会造成文件名太长的问题。

考虑到 pnpm 本身会造成带 + 的依赖搭配路径 + 用户的文件夹深度是无限可能的,感觉最好从当前 cwd 开始切,后面的路径用 hash 算一个短的。

hash 库供参考:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants