electron-builder: Does not work with NPM workspaces
- Electron-Builder Version: 23.3.3
- Node Version: v18.3.0
-
Electron Version: 20.1.0
-
Electron Type (current, beta, nightly): current
- Target: win32 x64
electron builder does not work in npm workspace it deletes app-builder-bin during “installing production dependencies” and then throws error:
• packaging platform=win32 arch=x64 electron=20.1.0 appOutDir=dist\win-unpacked
The system cannot find the path specified.
⨯ spawn C:\Users\user\dev\test-workspace\node_modules\app-builder-bin\win\x64\app-builder.exe ENOENT
also it deletes more packages from node_modules, so next run throws
'electron-builder' is not recognized as an internal or external command
Reproduction:
npm run build -w a in test-workspace.zip
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 16
- Comments: 24 (9 by maintainers)
Commits related to this issue
- fix: install all dependencies to fix building within NPM workspaces (#8715) Fixes https://github.com/electron-userland/electron-builder/issues/7103. — committed to electron-userland/electron-builder by beyondkmp 2 years ago
- Implement workaround for electron-builder npm workspaces issue - Create build-dist.js script to handle electron-builder packaging - Install app-builder-bin at root level to avoid ENOENT errors - Scri... — committed to nilukush/article_saver by deleted user a year ago
- Create standalone build script to work around npm workspaces issue - Created build-dist-standalone.js that temporarily removes workspace context - Installs electron-builder and app-builder-bin locall... — committed to nilukush/article_saver by deleted user a year ago
- Implement workaround for electron-builder npm workspaces issue - Create build-dist.js script to handle electron-builder packaging - Install app-builder-bin at root level to avoid ENOENT errors - Scri... — committed to nilukush/article_saver by deleted user a year ago
- Create standalone build script to work around npm workspaces issue - Created build-dist-standalone.js that temporarily removes workspace context - Installs electron-builder and app-builder-bin locall... — committed to nilukush/article_saver by deleted user a year ago
still not stale
not stale
still not stale
still not stale
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
still not stale
Implementation of
getElectronVersionFromInstalled()still needs to be fixed.Very intereesting.
Is there a proper way to detect if we’re in a npm workspace and can discern that dependencies are already installed?
Yes, still an issue: having to create an empty ‘node_modules’ folder on every workspace and having to fix the version of Electron on
package.jsonis very annoying…Try to add build option below in your
package.jsonwhich hasmainentry for electron app: