You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functioncreateRequire(filename){//Deprecated since: Node v12.2.0if(Module.createRequireFromPath)returnModule.createRequireFromPath(filename);if(Module.createRequire)// Reachable only in v16+returnModule.createRequire(filename);
module.createRequire throws error with the '' filename argument:
> const module = require('module')
undefined
> module.createRequire('')
Uncaught:
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ''
at new NodeError (node:internal/errors:329:5)
at Function.createRequire (node:internal/modules/cjs/loader:1189:13)
at REPL22:1:8
at Script.runInThisContext (node:vm:131:12)
at REPLServer.defaultEval (node:repl:522:29)
at bound (node:domain:416:15)
at REPLServer.runBound [as eval] (node:domain:427:12)
at REPLServer.onLine (node:repl:844:10)
at REPLServer.emit (node:events:381:22)
at REPLServer.emit (node:domain:470:12) {
code: 'ERR_INVALID_ARG_VALUE'
}
Activity