75lb / handbrake-js

Video encoding / transcoding / converting for node.js
Other
568 stars 69 forks source link

npm install fails due to expired certificate #71

Closed RevillWeb closed 2 years ago

RevillWeb commented 2 years ago

When I try to do npm install handbrake-js@2.2.2 (needed due to legacy application) I get the following error:

fetching: http://download.handbrake.fr/releases/0.10.5/HandBrake-0.10.5-x86_64-Win_CLI.zip
stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: certificate has expired
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1085:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:603:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)

Is there anyway I can work around this?

Full output:

 npm install -g handbrake-js@2.2.2
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated natives@1.1.6: This module relies on Node.js's internals and will break at some point. Do not use it, and update to graceful-fs@4.x.
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
C:\Program Files\nodejs\handbrake -> C:\Program Files\nodejs\node_modules\handbrake-js\bin\cli.js

> core-js@2.6.12 postinstall C:\Program Files\nodejs\node_modules\handbrake-js\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

> handbrake-js@2.2.2 postinstall C:\Program Files\nodejs\node_modules\handbrake-js
> node scripts/install.js

fetching: http://download.handbrake.fr/releases/0.10.5/HandBrake-0.10.5-x86_64-Win_CLI.zip
stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: certificate has expired
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1085:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:603:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
npm ERR! Windows_NT 10.0.19042
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "handbrake-js@2.2.2"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! handbrake-js@2.2.2 postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the handbrake-js@2.2.2 postinstall script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the handbrake-js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs handbrake-js
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls handbrake-js
npm ERR! There is likely additional logging output above.
npm ERR! Windows_NT 10.0.19042
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "handbrake-js@2.2.2"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! path C:\Program Files\Git\npm-debug.log.569547963
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\Git\npm-debug.log.569547963'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, open 'C:\Program Files\Git\npm-debug.log.569547963'
npm ERR!     at Error (native)
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Program Files\\Git\\npm-debug.log.569547963' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Program Files\Git\npm-debug.log

Any help would be greatly appreciated!

75lb commented 2 years ago

Yes, the download origin was changed from handbrake.fr to github.com in this commit (released in v4.0.1) as the handbrake.fr origin was unreliable.. Unfortunately, handbrake-js v2 is no longer maintained.. you'll need to fork handbrake-js yourself and test the new origin works in your environment..

75lb commented 2 years ago

btw, i would accept a PR and do a patch release for v2 - if you come up with a fix using the latest download origin..

RevillWeb commented 2 years ago

Thank you for your prompt response, I've worked around it locally.