mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-20 04:13:33 -04:00
9 lines
382 B
JavaScript
9 lines
382 B
JavaScript
import { createRequire as __cjs_createRequire } from "node:module";
|
|
import path from "node:path";
|
|
import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
// Runtime-safe require that avoids Node.js 20+ ESM loader assertion bug
|
|
const __cjs_require = (() => {
|
|
const requireFunc = __cjs_createRequire(process.argv[1] || path.resolve(process.cwd()));
|
|
return requireFunc;
|
|
})();
|