Electron桌面项目-解决throw new Error('Electron failed to install correctly, please delete node_modules..

Foreword

Electron is a use HTML, CSS and JavaScript to build an open source library cross-platform desktop applications. The GitHub development.


Electron The principle is to achieve this by combining Chromium and Node.js to the same runtime environment, and package it as an application under Mac, Windows and Linux systems.

In the company uses Linux systems, so we spent a little time trying to take an experience.

  1. This site installation has completed installation and deployment steps

  2. Creating a desktop electron structures such as project codes refer to the following link github
  3. According to a start operation of the Internet, eventually error, can not execute, direct throw new new Error --throw ( 'failed The Electron to
    install correctly &, Please node_modules the Delete / Electron and the try
    Installing Again') as shown

Here Insert Picture Description

  • Some recording operation
    Here Insert Picture Description

  • Check for a little information, turned out to be missing something that the library environment on my Ubuntu, but each person's situation is different, first make sure your Python version 2.7.x, as well as those installed node.js, and is completed those steps that go, again is installed below the library.

sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \
                       libnotify-dev libgnome-keyring-dev \
                       libasound2-dev libcap-dev libcups2-dev libxtst-dev \
                       libxss1 libnss3-dev gcc-multilib g++-multilib curl \
                       gperf bison python-dbusmock openjdk-8-jre

My library is not installed above, again tried again after successfully running.

The last successful run as follows
Here Insert Picture Descriptionsuccess

Guess you like

Origin www.cnblogs.com/yhycoder/p/12032381.html