steveseguin / electroncapture

Playback video in a frameless electron app for screen-sharing and window capture
http://electroncapture.app/
GNU General Public License v3.0
337 stars 40 forks source link

Trying to build for Debian 11 Linux #66

Open giantg opened 2 years ago

giantg commented 2 years ago

Hi,

I'm attempting to build for Debian 11 Linux. To ensure a consistent build environment I'm attempting a build within a Debian 11 docker container:

docker run --it -rm debian:11 /bin/bash

Once inside I've installed the following packages:

# apt update
# apt install build-essential curl git vim gcc g++ make -y
# curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
# /bin/bash ./nodesource_setup.sh
# apt update
# apt install -y nodejs
# node -v
v16.14.2
# npm -v
8.5.0

After checking out the source with a git clone https://github.com/steveseguin/electroncapture I receive the following error:

# cd /usr/local/src
# git clone https://github.com/steveseguin/electroncapture
# cd electroncapture
# npm install
npm notice 
npm notice New patch version of npm available! 8.5.0 -> 8.5.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.5
npm notice Run npm install -g npm@8.5.5 to update!
npm notice 
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: VDON.Electron.Capture.App@2.8.0
npm ERR! notsup Not compatible with your version of node/npm: VDON.Electron.Capture.App@2.8.0
npm ERR! notsup Required: {"node":"v16.14.0","npm":"8.3.1"}
npm ERR! notsup Actual:   {"npm":"8.5.0","node":"v16.14.2"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-22T07_29_48_153Z-debug-0.log

At that point I updated npm to 8.5.5 as suggested by the error:

# npm install -g npm@8.5.5

removed 20 packages, changed 56 packages, and audited 201 packages in 1s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

However, at that point I still seem to get a failure:

# npm install
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: VDON.Electron.Capture.App@2.8.0
npm ERR! notsup Not compatible with your version of node/npm: VDON.Electron.Capture.App@2.8.0
npm ERR! notsup Required: {"node":"v16.14.0","npm":"8.3.1"}
npm ERR! notsup Actual:   {"npm":"8.5.5","node":"v16.14.2"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-22T07_37_42_672Z-debug-0.log

I've seen suggestions to also try installing the matching versions of node and npm requested by the error, but that seems to land me stuck as well:

# npm install -g node@16.14.0 npm@8.3.1
npm ERR! code EEXIST
npm ERR! path /usr/bin/node
npm ERR! EEXIST: file already exists
npm ERR! File exists: /usr/bin/node
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-22T07_41_30_844Z-debug-0.log

Trying to --force the above results in error as well:

# npm install -g node@16.14.0 npm@8.3.1 --force
npm WARN using --force Recommended protections disabled.
npm ERR! code 1
npm ERR! path /usr/lib/node_modules/node
npm ERR! command failed
npm ERR! command sh -c node installArchSpecificPackage
npm ERR! /bin/sh: 1: npm: not found
npm ERR! node:internal/modules/cjs/loader:936
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module 'node-linux-x64/package.json'
npm ERR! Require stack:
npm ERR! - /usr/lib/node_modules/node/installArchSpecificPackage.js
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR!     at Function.resolve (node:internal/modules/cjs/helpers:108:19)
npm ERR!     at ChildProcess.<anonymous> (/usr/lib/node_modules/node/node_modules/node-bin-setup/index.js:19:27)
npm ERR!     at ChildProcess.emit (node:events:526:28)
npm ERR!     at maybeClose (node:internal/child_process:1092:16)
npm ERR!     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [ '/usr/lib/node_modules/node/installArchSpecificPackage.js' ]
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-22T07_42_14_828Z-debug-0.log

Is there anything obvious I'm doing wrong? I have to confess while I am a developer I'm not a nodejs developer. I saw the previously closed Issue #53 where @jcalado mentioned a "healthy nodejs environment" and the recommended steps below "just work":

  1. git clone https://github.com/steveseguin/electroncapture.git
  2. cd electroncapture
  3. npm install
  4. npm run build:linux

I must not have a healthy nodejs environment or I've done something else wrong. Any help is appreciated.

Thank you

steveseguin commented 2 years ago

There's a file called package.json in the folder. Update your npm/node to the newest you can I guess, and then modify the package.json file with the versions you have installed. There will be a couple lines near the bottom for it.

Let me know if that doesn't work