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

Vue build doesn't work with pnpm #48

Open
MichaHuhn opened this issue Sep 6, 2024 · 0 comments
Open

Vue build doesn't work with pnpm #48

MichaHuhn opened this issue Sep 6, 2024 · 0 comments

Comments

@MichaHuhn
Copy link

I'm not able to build a Vue project with pnpm. It works with npm.

Important

  • Windows 10
  • pnpm version: 9.9.0
  • npm version: 10.8.3

Steps to reproduce the issue:

  1. pnpm create electron-vite electron-vue-project
  2. Select Vue
  3. cd electron-vue-project
  4. pnpm i
  5. pnpm build
  6. Fix TypeScript error by removing const require = in electron/main.ts
  7. Run pnpm build again

These steps result in the following console output:

electron-builder  version=24.13.3 os=10.0.19045
  • loaded configuration  file=C:\Users\micha\Desktop\electron-vue-project\electron-builder.json5
  • description is missed in the package.json  appPackageFile=C:\Users\micha\Desktop\electron-vue-project\package.json
  • author is missed in the package.json  appPackageFile=C:\Users\micha\Desktop\electron-vue-project\package.json
  • writing effective config  file=release\0.0.0\builder-effective-config.yaml
  • packaging       platform=win32 arch=x64 electron=30.4.0 appOutDir=release\0.0.0\win-unpacked
  • default Electron icon is used  reason=application icon is not set
  • building        target=nsis file=release\0.0.0\YourAppName-Windows-0.0.0-Setup.exe archs=x64 oneClick=false perMachine=false
  ⨯ C:\Users\micha\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Output:
Command line defined: "APP_ID=YourAppID"
Command line defined: "APP_GUID=e8a1d95b-2268-5534-a8b7-a46da8c43aa5"
Command line defined: "UNINSTALL_APP_KEY=e8a1d95b-2268-5534-a8b7-a46da8c43aa5"
Command line defined: "PRODUCT_NAME=YourAppName"
Command line defined: "PRODUCT_FILENAME=YourAppName"
Command line defined: "APP_FILENAME=YourAppName"
Command line defined: "APP_DESCRIPTION="
Command line defined: "VERSION=0.0.0"
Command line defined: "PROJECT_DIR=C:\Users\micha\Desktop\electron-vue-project"
Command line defined: "BUILD_RESOURCES_DIR=C:\Users\micha\Desktop\electron-vue-project\build"
Command line defined: "APP_PACKAGE_NAME=electron-vue-project"
Command line defined: "APP_64=C:\Users\micha\Desktop\electron-vue-project\release\0.0.0\electron-vue-project-0.0.0-x64.nsis.7z"
Command line defined: "APP_64_NAME=electron-vue-project-0.0.0-x64.nsis.7z"
Command line defined: "APP_64_HASH=E6D6A043152CD14803C96A6CECEE75685AF8FE1C769B2BDA875DBA562A138C8FB7434AD2A54F06939C89CB0C649D709C09392DC32600CA0BEACB95F3464257DD"
Command line defined: "APP_64_UNPACKED_SIZE=262354"
Command line defined: "APP_INSTALLER_STORE_FILE=electron-vue-project-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "MULTIUSER_INSTALLMODE_ALLOW_ELEVATION"
Command line defined: "INSTALL_MODE_PER_ALL_USERS_REQUIRED"
Command line defined: "allowToChangeInstallationDirectory"
Command line defined: "SHORTCUT_NAME=YourAppName"
Command line defined: "UNINSTALL_DISPLAY_NAME=YourAppName 0.0.0"
Command line defined: "MUI_WELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "MUI_UNWELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "ESTIMATED_SIZE=262354"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=C:\Users\micha\Desktop\electron-vue-project\release\0.0.0\__uninstaller-nsis-electron-vue-project.exe"
Processing config: C:\Users\micha\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (UTF8)

Error output:
!include: could not open file: "C:\Users\micha\Desktop\electron-vue-project\node_modules\.pnpm\[email protected][email protected][email protected]__electr_jhkj5etvr5lkpiqd5wtx2uh6ge\node_modules\app-builder-lib\templates\nsis\include\allowOnlyOneInstallerInstance.nsh"
Error in script "<stdin>" on line 88 -- aborting creation process
  failedTask=build stackTrace=Error: C:\Users\micha\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Output:
Command line defined: "APP_ID=YourAppID"
Command line defined: "APP_GUID=e8a1d95b-2268-5534-a8b7-a46da8c43aa5"
Command line defined: "UNINSTALL_APP_KEY=e8a1d95b-2268-5534-a8b7-a46da8c43aa5"
Command line defined: "PRODUCT_NAME=YourAppName"
Command line defined: "PRODUCT_FILENAME=YourAppName"
Command line defined: "APP_FILENAME=YourAppName"
Command line defined: "APP_DESCRIPTION="
Command line defined: "VERSION=0.0.0"
Command line defined: "PROJECT_DIR=C:\Users\micha\Desktop\electron-vue-project"
Command line defined: "BUILD_RESOURCES_DIR=C:\Users\micha\Desktop\electron-vue-project\build"
Command line defined: "APP_PACKAGE_NAME=electron-vue-project"
Command line defined: "APP_64=C:\Users\micha\Desktop\electron-vue-project\release\0.0.0\electron-vue-project-0.0.0-x64.nsis.7z"
Command line defined: "APP_64_NAME=electron-vue-project-0.0.0-x64.nsis.7z"
Command line defined: "APP_64_HASH=E6D6A043152CD14803C96A6CECEE75685AF8FE1C769B2BDA875DBA562A138C8FB7434AD2A54F06939C89CB0C649D709C09392DC32600CA0BEACB95F3464257DD"
Command line defined: "APP_64_UNPACKED_SIZE=262354"
Command line defined: "APP_INSTALLER_STORE_FILE=electron-vue-project-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "MULTIUSER_INSTALLMODE_ALLOW_ELEVATION"
Command line defined: "INSTALL_MODE_PER_ALL_USERS_REQUIRED"
Command line defined: "allowToChangeInstallationDirectory"
Command line defined: "SHORTCUT_NAME=YourAppName"
Command line defined: "UNINSTALL_DISPLAY_NAME=YourAppName 0.0.0"
Command line defined: "MUI_WELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "MUI_UNWELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "ESTIMATED_SIZE=262354"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=C:\Users\micha\Desktop\electron-vue-project\release\0.0.0\__uninstaller-nsis-electron-vue-project.exe"
Processing config: C:\Users\micha\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\nsisconf.nsh
Processing script file: "<stdin>" (UTF8)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Error output:
!include: could not open file: "C:\Users\micha\Desktop\electron-vue-project\node_modules\.pnpm\[email protected][email protected][email protected]__electr_jhkj5etvr5lkpiqd5wtx2uh6ge\node_modules\app-builder-lib\templates\nsis\include\allowOnlyOneInstallerInstance.nsh"
Error in script "<stdin>" on line 88 -- aborting creation process
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   at ChildProcess.<anonymous> (C:\Users\micha\Desktop\electron-vue-project\node_modules\.pnpm\[email protected]\node_modules\builder-util\src\util.ts:252:14)
    at Object.onceWrapper (node:events:634:26)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess.cp.emit (C:\Users\micha\Desktop\electron-vue-project\node_modules\.pnpm\c[email protected]\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1105:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
 ELIFECYCLE  Command failed with exit code 1.
vue.build.issue.mp4

How can this issue be fixed?

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

No branches or pull requests

1 participant