Skip to content

ReferenceError: require is not defined at server.js:1147 #467

@DeadShot021

Description

@DeadShot021

The Stremio application fails to start the streaming server on multiple devices and platforms, showing a persistent error related to Node.js module loading. This issue occurs with both fresh installations and existing installations, across different Stremio versions.

Stremio streaming server has thrown an error
QProcess::ProcessError code: 1

file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:1147
module.exports = require("url");
^

ReferenceError: require is not defined
at Object. (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:1147:5)
at webpack_require (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:11:34)
at Object. (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:18111:15)
at webpack_require (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:11:34)
at Object. (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:46572:24)
at Object. (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:46930:8)
at webpack_require (file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:11:34)
at file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:45:36
at file:///C:/Users/User/AppData/Local/Programs/LNV/Stremio-4/server.js:46:3
at ModuleJob.run (internal/modules/esm/module_job.js:146:23)

Environment

OS: Windows 10 (10.0.19045.6466)
Stremio Versions Tested: v4.4 (stable), v5 x64 (beta)
Also tested on: iPhone 15 (iOS latest), Stremio Web
Node.js: Not installed on system
Location: Portugal

Steps to Reproduce

Install Stremio v4.4 from official website
Launch application
Attempt to play any content
Error appears: "Error while starting streaming server"

What I've Tried (ALL FAILED)
✅ Complete reinstallation (multiple times)
✅ Deleted all app data folders
✅ Ran Windows repair commands (sfc /scannow, DISM)
✅ Installed as Administrator
✅ Disabled antivirus
✅ Tested with VPN
✅ Created new Stremio account
✅ Tested on multiple devices (PC + iPhone)
✅ Tested different network connections
✅ System restarts
None of these resolved the issue.
Current Status

Application opens but streaming server shows: http://127.0.0.1:11470/ - Status: Error
Cannot play any content
Affects ALL platforms (desktop, mobile, web)
Affects multiple accounts
No workaround found

Expected Behavior
Streaming server should start successfully and allow content playback.
Actual Behavior
Server fails to initialize with Node.js module error, making the app completely unusable for streaming.
Possible Cause
The error suggests a conflict between CommonJS (require()) and ES Modules in the bundled server.js file. The webpack bundle attempts to use require() in an ES Module context where it's not defined.
Impact
🔴 Critical - Application is completely unusable. This is not a configuration issue but appears to be a fundamental bug in how Node.js modules are bundled in server.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions