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

when building, it raises: ERROR in renderer.js from Terser #1052

Open PeterlitsZo opened 3 years ago

PeterlitsZo commented 3 years ago

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

Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.

Describe the issue / bug.

# I want to use Monaco Editor in my project, but it raise this error and I do not know that it be because of this project or that project. I put a same issue at here: https://github.com/microsoft/monaco-editor-webpack-plugin/issues/131

How can I reproduce this problem?

# You can follow this project, it is the mini way to get the same problem: https://github.com/PeterlitsZo/Mini_Manoca_error.

If visual, provide a screenshot.

# I'd like to put some pic here:

run npm run dev, OK: Screenshot from 2020-11-15 16-58-00

run npm run build, error: [error when upload >_<]

run npm run dev(Mini way), OK: [error when upload >_<]

run npm run build(Mini way), error: [error when upload >_<]

Tell me about your development environment.

If you are looking to suggest an enhancement or feature, then feel free to remove everything above.

LittleSheep2Code commented 3 years ago

Same problem!

PeterlitsZo commented 3 years ago

Same problem!

Well, use vue-cli to run command vue add electron-builder to get vue-cli-plugin-electron-builder instead of vue-elecron. This project is too old.

More infomationes: https://github.com/nklayman/vue-cli-plugin-electron-builder

PeterlitsZo commented 3 years ago

@LittleSheep2010

electron-packger (x) electron-builder (o)

LittleSheep2Code commented 3 years ago

So I need use electron-builder?

LittleSheep2Code commented 3 years ago

I got an error while executing yarn run electron:serve

(base) ➜  SpeedCode-ClientV2 yarn run electron:serve            
yarn run v1.22.10
warning package.json: No license field
$ vue-cli-service electron:serve
/bin/sh: vue-cli-service: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PeterlitsZo commented 3 years ago

I got an error while executing yarn run electron:serve

(base) ➜  SpeedCode-ClientV2 yarn run electron:serve            
yarn run v1.22.10
warning package.json: No license field
$ vue-cli-service electron:serve
/bin/sh: vue-cli-service: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This works on my machine! I guess you should:

  1. Try to understand the error infomations.
  2. Use Google or Bing.
  3. Ask at https://github.com/nklayman/vue-cli-plugin-electron-builder/issues or stackoverflow.

By the way, you can try to run command npm install -g @vue/cli or something else, I guess (WARNING! not sure and even do not test on my computer). This points that the executable programme do not in PATH, so you should to know how to get it and put its path in environment variable PATH.

LittleSheep2Code commented 3 years ago

I use electron-builder create a new project. and use monaco-editor but it does't work!

PeterlitsZo commented 3 years ago

I use electron-builder create a new project. and use monaco-editor but it does't work!

It works on my project: https://github.com/PeterlitsZo/MersenneTodo. Maybe you can find some useful things in my project.