Reputation: 98
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'
Upvotes: 0
Views: 941
Reputation: 4764
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
Upvotes: 1
Reputation: 98
So no sooner did I post this question did I find a question for a similar installation with a few answers.
The rationale is that you need a package.json
file wherever you're installing a project, so run npm init
first in your desired directory before installing. Also you can just install globally as shown in the answer
EDIT: Here is a 101 on npm and installs.
Upvotes: 0