Try to re-fix tests

pull/6266/head
Chocobozzz 2024-02-26 09:36:11 +01:00
parent e2b2c46339
commit 1abf74e464
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 3 deletions

View File

@ -25,9 +25,7 @@ export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile
const data = await readFile(torrentPath)
// FIXME: use classic import, on node 18.18 we have an error
// "[ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in .../node_modules/parse-torrent/package.json"
return require('parse-torrent')(data)
return (await import('parse-torrent')).default(data)
}
// ---------------------------------------------------------------------------