Closed
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 修复 Electron 构建脚本在处理 Next.js standalone 输出中的“指向目录的符号链接”时,因 fs.rmSync() 未开启递归删除而报错的问题,保证 npm run electron:build 可正常执行并为后续 electron-builder 打包准备好可复制的目录结构。
Changes:
- 为删除 standalone 目录下的符号链接时的
fs.rmSync()增加{ recursive: true, force: true }参数,避免遇到目录型符号链接时报ERR_FS_EISDIR。
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Thanks for the fix! This change was already included in PR #7 which has been merged. Closing as duplicate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
执行
npm run electron:build时,scripts/build-electron.mjs在解析.next/standalone/.next/node_modules/中的符号链接时报错:部分条目(如
better-sqlite3-90e2652d1716b047)是指向目录的符号链接,fs.rmSync()在未传入{ recursive: true }时会抛出ERR_FS_EISDIR错误。修复
为
fs.rmSync()添加{ recursive: true, force: true }参数。