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.46k stars 1.54k forks source link

Build issue: SyntaxError: Identifier 'tasks' has already been declared #1076

Closed RoshanMali closed 3 years ago

RoshanMali commented 3 years ago

Found an issue or bug with electron-vue? Tell me all about it!

Describe the issue / bug.

Thank you for creating this package.

I'm facing this issue while building:

const tasks = new Listr(
        ^

SyntaxError: Identifier 'tasks' has already been declared
    at wrapSafe (internal/modules/cjs/loader.js:931:16)
    at Module._compile (internal/modules/cjs/loader.js:979:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

on .electron-vue\build.js:45

How can I reproduce this problem?
  1. Create new project using this command: vue init simulatedgreg/electron-vue my-project
  2. run: npm run build
If visual, provide a screenshot.

image

Tell me about your development environment.
itenl commented 3 years ago

Same issues, but u can comment the code to working, btw, it is recommended that u use electron-builder.

huaeval commented 3 years ago

rename tasks

oldsweet commented 3 years ago

Same issues,can someone can help me? QwQ

doc-han commented 3 years ago

This is an actual error in the code. Tasks has been defined multiple times.

phelogges commented 3 years ago

i got this issue solved by commenting tasks and Multispinner instance, then upgrading electron-builder to the latest version.

eliooses commented 3 years ago

Thanks for the workaround @phelogges !, works like a charm.

RoshanMali commented 3 years ago

@phelogges solution worked, Thanks.

583 commented 2 years ago

I solved this issue by rename the follow code. line 45 => " const tasks" to " const _tasks" line 77 => " await tasks " to " await _tasks"