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
I'm trying to build my Electron app using electron-builder (v22.11.7), but it is failing with the error in the title. It appears the issue occurs in this library, which is why I am posting it here.
The full logs are available at the Github action but I've copied what seems relevant at the end of the issue.
From some further inspection, it seems that the issue is because readHashBang in the file I referenced only checks the first part of the hash bang (before a space). Because pnpm uses the /usr/bin/env node form of hashbang, app-builder isn't detecting that it should be run using node.
There are a couple ways this could be worked around - pnpm uses the .cjs file extension, so that could be added as one that is recognised as a js file. Or, the hashbang detection could be improved to support /usr/bin/env. I'll make a PR tomorrow to do the latter (I've got to sleep now) - I've tested it in the reproduction repo I made, and it seems to work now.
app-builder-bin version: 3.5.13
node version: 14.17.3
I'm trying to build my Electron app using electron-builder (v22.11.7), but it is failing with the error in the title. It appears the issue occurs in this library, which is why I am posting it here.
The full logs are available at the Github action but I've copied what seems relevant at the end of the issue.
My guess is that the issue is happening in https://github.com/develar/app-builder/blob/master/pkg/node-modules/rebuild.go#L361.
I've made a minimum reproduction of it at https://github.com/Alduino/app-builder-navw32a-repro. The logs are in its gh actions. The issue occurs both using workspaces and without, and with two different libraries ([email protected], [email protected]).
Relevant logs (from the reproduction as they are shorter)
The text was updated successfully, but these errors were encountered: