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

Unable to build my vue-cli app using vue-cli-plugin-electron-builder 2.1.1 #1983

Open
gankush opened this issue Sep 13, 2023 · 0 comments
Open

Comments

@gankush
Copy link

gankush commented Sep 13, 2023

electron:serve is working fine but electron:build is failing

electron:serve is working fine but build is failing while using version 2.1.1.
Build is only working while using alpha version i.e. [3.0.0-alpha.4]

To Reproduce
Steps to reproduce the behavior:

  • I am currently using node 18 and "@vue/cli-service": "~5.0.8" and "vue-cli-plugin-electron-builder": "~2.1.1"
  • On running "vue-cli-service electron:build --win" , I am getting the following error

_background.js from Terser
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\node_modules\webpack\node_modules\terser-webpack-plugin\dist\index.js:217:37
at Array.forEach ()
at TerserPlugin.optimizeFn (D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\node_modules\webpack\node_modules\terser-webpack-plugin\dist\index.js:160:259)
at _next0 (eval at create (D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\node_modules\tapable\lib\HookCodeFactory.js:33:10), :8:1)
at eval (eval at create (D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\node_modules\tapable\lib\HookCodeFactory.js:33:10), :23:1)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\index.js:198
throw new Error('Build failed with errors.')_

Expected behavior

Build should be successful without any errors

Screenshots

image

Environment (please complete the following information):

System:
OS: Windows 10 10.0.22621
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 18.17.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 3.10.10 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.76)

Additional context

If I have updating line : 217 in D:\cds\frontend\node_modules\vue-cli-plugin-electron-builder\node_modules\webpack\node_modules\terser-webpack-plugin\dist\index.js:217:37 , build is working

Wondering if I can add/update any configuration in vue.config.js to fix this?

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