Electron-vue the problem of packing with Electron-packager

Source: Internet
Author: User

Starskeeper's development is coming to an end, trying to pack it up, but Fullscreen's error is recorded to prevent another step in the pit

First, the project Scaffold is Electron-vue project, when the project scaffolding will be generated when you choose the Packaging method (Electron-packager OR electron-builder), I chose the former

View the project's Package.json file, find the command that was packaged on the MacOS platform npm build build:darwin , and then error. Error message can not, anyway, because I install dependent on the time with the CNPM, change to NPM is OK , the specific reason is unknown. Then you can package it into an. app file

Then open the app, white screen. In the production environment is not open the Dev window, then you can add a similar open window in the code, mainWindow.openDevTools() I found that I index.ejs used to //xxx introduce a CDN, and then because the open file is a local file, files protocol beginning, so the error, remove this useless CDN introduced Okay, OK.

Then the package is finished, 130m+, self-use can also accept

By the way, note the other errors that may be generated:

    • Node version is too low (I'm v8.0.0 version, no problem)
    • NPM version issue (@5.3.0 will have a problem, see issue, Upgrade NPM)
    • White screen problem. This issue points out the scheme of configuring Whitelistedmodules, I have appeared as he pictured [not cacheable] , but the packing result is no problem. Also, this issue indicates that a piece of code can be commented to solve the problem

Electron-vue the problem of packing with Electron-packager

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.