electron-vue icon indicating copy to clipboard operation
electron-vue copied to clipboard

Error while build for production

Open vkiranmaniya opened this issue 5 years ago • 2 comments
trafficstars

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! [email protected] build: `node .electron-vue/build.js && electron-builder -mw`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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.
  • Node version: 10.16.0
  • NPM version: 6.14.4
  • Operating System: MacOS HighSeirra

vkiranmaniya avatar May 01 '20 21:05 vkiranmaniya

Could you solve it?

diavrank avatar Oct 17 '20 11:10 diavrank

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.

  • Node 12.18.4
  • Mac OS Catalina 10.15.6
  • Npm 6.14.6

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

diavrank avatar Oct 17 '20 11:10 diavrank