Search code examples
node.jsubuntunpmelectronlinux-mint

npm error when installing Electron-Js from npm


Tried to install the Electron-JS to my Linux Mint 20.1. I built Node Js from source (v.14.5), and installed Chromium from apt, both successfully. When trying to install Electron from npm, I got the following errors/warnings(?):

Downloading electron-v11.3.0-linux-x64.zip: [========] 100% ETA: 0.0 seconds 

npm WARN saveError ENOENT: no such file or directory, open '/home/maranga/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/maranga/package.json'

npm WARN

  1. What do they mean?
  2. Will they stop me from using electron?
  3. Should I just build electron from source/binaries to prevent further issues?

Solution

  • Perhaps you need to starting by :

    npm init / yarn init
    

    in your directory project if you want to develop a project.

    And after this command you will have a package.json and package-lock.json