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

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

Open PeterlitsZo opened this issue 4 years ago • 8 comments

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.
  • Node version: v12.8.2
  • NPM version: v6.14.8
  • vue-cli version: (if necessary) 2.9.6
  • Operating System: GUN/linux, Ubuntu

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

PeterlitsZo avatar Nov 15 '20 13:11 PeterlitsZo

Same problem!

LittleSheep2Code avatar Feb 17 '21 14:02 LittleSheep2Code

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 avatar Feb 17 '21 15:02 PeterlitsZo

@LittleSheep2010

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

PeterlitsZo avatar Feb 17 '21 15:02 PeterlitsZo

So I need use electron-builder?

LittleSheep2Code avatar Feb 17 '21 15:02 LittleSheep2Code

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.

LittleSheep2Code avatar Feb 17 '21 15:02 LittleSheep2Code

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.

PeterlitsZo avatar Feb 17 '21 15:02 PeterlitsZo

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

LittleSheep2Code avatar Feb 18 '21 02:02 LittleSheep2Code

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.

PeterlitsZo avatar Feb 18 '21 09:02 PeterlitsZo