SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.47k stars 1.54k forks source link

Error while build for production #1009

Open vkiranmaniya opened 4 years ago

vkiranmaniya commented 4 years ago

Description

I'm having trouble while building the app for production, The package bufferutil and utf-8-validate not found. Here is the complete log.

Log
Error: Unresolved node modules: bufferutil, utf-8-validate
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/packageDependencies.ts:112:21
From previous event:
    at Collector.resolveUnresolvedHoisted (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/packageDependencies.ts:88:81)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/packageDependencies.ts:83:18
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Collector.collect (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/packageDependencies.ts:76:28)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/packageDependencies.ts:47:44
    at Generator.next (<anonymous>)
    at _getProductionDependencies (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/packageDependencies.js:92:37)
    at getProductionDependencies (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/packageDependencies.js:83:37)
    at Lazy.<anonymous> (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:138:24)
    at Generator.next (<anonymous>)
    at Lazy.get value [as value] (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/lazy-val/src/main.ts:18:25)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/yarn.js:166:90
From previous event:
    at _getProductionDependencies (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/packageDependencies.js:92:37)
    at getProductionDependencies (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/packageDependencies.js:83:37)
    at Lazy.<anonymous> (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:138:24)
    at Generator.next (<anonymous>)
From previous event:
    at Lazy.get value [as value] (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/lazy-val/src/main.ts:18:25)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/yarn.js:166:90
    at Generator.next (<anonymous>)
From previous event:
    at _rebuild (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/yarn.ts:179:5)
    at rebuild (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/yarn.js:163:19)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/util/yarn.ts:20:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at _installOrRebuild (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/yarn.js:71:28)
    at installOrRebuild (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/out/util/yarn.js:55:28)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:509:13
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:470:70)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:420:20
    at Generator.next (<anonymous>)
From previous event:
    at Packager.doBuild (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:396:24)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:366:57
    at Generator.next (<anonymous>)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/graceful-fs/graceful-fs.js:136:16
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/graceful-fs/graceful-fs.js:57:14
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at Packager._build (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:335:133)
    at /Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:331:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Packager.build (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/packager.ts:288:14)
    at build (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/app-builder-lib/src/index.ts:59:28)
    at build (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/electron-builder/src/builder.ts:228:10)
    at then (/Users/vkiranmaniya/Projects/Electron/Vue/accurate/node_modules/electron-builder/src/cli/cli.ts:49:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! accurate@1.0.0 build: `node .electron-vue/build.js && electron-builder -mw`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the accurate@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/vkiranmaniya/.npm/_logs/2020-05-01T21_25_47_856Z-debug.log
Tell me about your development environment.
diavrank commented 3 years ago

Could you solve it?

diavrank commented 3 years ago

I installed those dependencies with npm and update electron-builder to 21.2.0 and solved the problem. Finally, I could generate the dmg file and install it succesfully.

references: https://github.com/camunda/camunda-modeler/issues/1529#issuecomment-554998634