thedave42 / f1tv-dl

Watch videos from f1tv locally
47 stars 5 forks source link

Error: Cannot find module 'temp' with node16 or 18. #318

Closed bberenberg closed 1 year ago

bberenberg commented 1 year ago

From first install using either node 16 or 18. Not sure if I am overlooking something simple here.

f1tv-dl https://f1tv.formula1.com/detail/1000006683/-
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'temp'
Require stack:
- /Users/boris/.nvm/versions/node/v18.16.0/lib/node_modules/@thedave42/f1tv-dl/lib/dash-downloader.js
- /Users/boris/.nvm/versions/node/v18.16.0/lib/node_modules/@thedave42/f1tv-dl/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/boris/.nvm/versions/node/v18.16.0/lib/node_modules/@thedave42/f1tv-dl/lib/dash-downloader.js:6:14)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/boris/.nvm/versions/node/v18.16.0/lib/node_modules/@thedave42/f1tv-dl/lib/dash-downloader.js',
    '/Users/boris/.nvm/versions/node/v18.16.0/lib/node_modules/@thedave42/f1tv-dl/index.js'
  ]
}
nuxy69 commented 1 year ago

I had the same, described in Issue https://github.com/thedave42/f1tv-dl/issues/317

You need the temp module. Install it with "npm i -g temp". Then restart Docker.

bberenberg commented 1 year ago

Added a PR at https://github.com/thedave42/f1tv-dl/pull/319 which may help address this.