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.48k stars 1.55k forks source link

run build Error #1079

Open wangjingithub opened 3 years ago

wangjingithub commented 3 years ago

Application entry file "dist\electron\main.js" in the "D:\Demo\electron-demo\my-project\build\win-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration.

wangjingithub commented 3 years ago

λ yarn run build yarn run v1.22.10 warning package.json: No license field $ node .electron-vue/build.js && electron-builder


/_ \ /\ __ __ /\ \ /_ \ /\ \ \//\ \ / ,.`\ \ \ ,_\ / ,_\ ____ \ \ _ /\ \/\ \ /_\ \//\ \ _\ \ _\ \ /\ / \ \ \/ /_, `\/_____\ \ \ ,. \ \ _\ \/\ \ _\ _ /\ ,. \ /_\ _\ \ \ _ \/_/\/__/ \ __/ \ __/ \ \ \ /__\ __\ \// \// \ __\ \// \// \// \/_/ \/_/ \/ / \/__/

(node:13100) UnhandledPromiseRejectionWarning: ReferenceError: Multispinner is not defined at build (D:\Demo\electron-demo\my-project.electron-vue\build.js:38:13) at Object. (D:\Demo\electron-demo\my-project.electron-vue\build.js:24:6) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 (Use node --trace-warnings ... to show where the warning was created) (node:13100) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:13100) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. • electron-builder version=20.44.4 • loaded configuration file=package.json ("build" field) • writing effective config file=build\builder-effective-config.yaml • no native production dependencies • packaging platform=win32 arch=x64 electron=2.0.18 appOutDir=build\win-unpacked Error: Application entry file "dist\electron\main.js" in the "D:\Demo\electron-demo\my-project\build\win-unpacked\resources\app.asar" does not exist. Seems like a wrong configuration. at error (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\out\asar\asarFileChecker.js:44:14) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:30:4 at Generator.next () at callback (D:\Demo\electron-demo\my-project\node_modules\graceful-fs\polyfills.js:299:20) at FSReqCallback.oncomplete (fs.js:184:5) From previous event: at _checkFileInArchive (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\asar\asarFileChecker.ts:36:17) at checkFileInArchive (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\out\asar\asarFileChecker.js:40:30) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:409:13 at Generator.next () From previous event: at WinPackager.checkFileInPackage (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:406:110) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:460:16 at Generator.next () at callback (D:\Demo\electron-demo\my-project\node_modules\graceful-fs\polyfills.js:299:20) at FSReqCallback.oncomplete (fs.js:184:5) From previous event: at WinPackager.sanityCheckPackage (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:446:92) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:249:16 at Generator.next () at processImmediate (internal/timers.js:461:21) From previous event: at WinPackager.doPack (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:167:165) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:113:16 at Generator.next () From previous event: at WinPackager.pack (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\platformPackager.ts:111:95) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:430:24 at Generator.next () at D:\Demo\electron-demo\my-project\node_modules\fs-extra-p\node_modules\fs-extra\lib\mkdirs\mkdirs.js:56:16 at callback (D:\Demo\electron-demo\my-project\node_modules\graceful-fs\polyfills.js:299:20) at FSReqCallback.oncomplete (fs.js:184:5) From previous event: at Packager.doBuild (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:396:24) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:366:57 at Generator.next () at D:\Demo\electron-demo\my-project\node_modules\graceful-fs\graceful-fs.js:144:16 at D:\Demo\electron-demo\my-project\node_modules\graceful-fs\graceful-fs.js:61:14 at FSReqCallback.oncomplete (fs.js:171:23) From previous event: at Packager._build (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:335:133) at D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:331:23 at Generator.next () at processImmediate (internal/timers.js:461:21) From previous event: at Packager.build (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\packager.ts:288:14) at build (D:\Demo\electron-demo\my-project\node_modules\app-builder-lib\src\index.ts:59:28) at build (D:\Demo\electron-demo\my-project\node_modules\electron-builder\src\builder.ts:228:10) at D:\Demo\electron-demo\my-project\node_modules\electron-builder\src\cli\cli.ts:49:19 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

chenxwei commented 3 years ago

How to solve this problem?

survivor0716 commented 3 years ago

Just install the dependency.

npm i multispinner

and then import it in .electron-vue/build.js

const Multispinner = require('multispinner')

It's just a temporary solution.