Open ifree92 opened 7 months ago
Probably, this is the related issue https://github.com/electron/forge/issues/3549
I have the same issue with blow error.
An unhandled rejection has occurred inside Forge:
Error: Cannot copy '../errno/cli.js' to a subdirectory of itself, '../errno/cli.js'.
at /Users/niklaus/git/konty/node_modules/fs-extra/lib/copy/copy.js:213:21
at FSReqCallback.oncomplete (node:fs:187:23)
Tried to update @electron/asar@3.2.10
, but still not work.
I have the same issue with blow error.
An unhandled rejection has occurred inside Forge: Error: Cannot copy '../errno/cli.js' to a subdirectory of itself, '../errno/cli.js'. at /Users/niklaus/git/konty/node_modules/fs-extra/lib/copy/copy.js:213:21 at FSReqCallback.oncomplete (node:fs:187:23)
Tried to update
@electron/asar@3.2.10
, but still not work.
It turns out that my issue is a problem with a specific package (optimization-js
). After elimination of the package, build works well.
Pre-flight checklist
Electron Forge version
6.4.0, 6.3.1 as well (older version did not test)
Electron version
29.3.0
Operating system
macOS 14.4.1 (tried on Windows, no issues, seems this is specific for macOS)
Last known working Electron Forge version
No response
Expected behavior
The package process should finish without an error and provide a successful macOS build.
Actual behavior
Below is the console output of the
npm run package
command that ends with an error without a successful build.Steps to reproduce
I've been using NodeJS
20.9.0
, NPM version is10.1.0
.You will get an error posted in "Actual Behavior" section. I even have no idea why is it happening. But once
typeorm
is removed (npm uninstall typeorm
), now the build is successful. Kinda a "special" reaction on thetypeorm
.Additional information
I did not specify the config files here, cos it is reproducible using a raw vite-typescript template without any modifications. In fact, the files by those symlinks exist:
Even in a temp folder:
Except
typeorm
, other packages also have symlinks from their.bin
folder to the specific JS files:Probably the issue is mostly related to the
@electron/asar
behavior, however, it is a part of the templatevite-typescript
that I'm using, so it is posted here.NOTE: For the
webpack-typescript
there is no issue, it works as expected withtypeorm
. The problem happens only whenvite-typescript
template is used!