{"record":{"id":"5882ebf448d8076b","repo":"docmirror/dev-sidecar","slug":"free-eye","errorCode":null,"errorMessage":"加载 free-eye 插件失败，该插件不可用:","messagePattern":"加载 free-eye 插件失败，该插件不可用:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/core/src/modules/plugin/index.js","lineNumber":13,"sourceCode":"module.exports = {\n  node: require('./node'),\n  git: require('./git'),\n  pip: require('./pip'),\n  overwall: require('./overwall'),\n  // free-eye 为 ESM 模块，CJS require() 得到 { default: ... }，需解包\n  // 独立可执行文件（SEA）中无法打包/携带 free-eye，加载失败时降级为不可用，而不是崩溃\n  get free_eye () {\n    try {\n      return require('./free-eye').default\n    } catch (e) {\n      const log = require('@docmirror/dev-sidecar/src/utils/util.log-or-console')\n      log.warn('加载 free-eye 插件失败，该插件不可用:', e.message)\n      return null\n    }\n  },\n}\n","sourceCodeStart":1,"sourceCodeEnd":18,"githubUrl":"https://github.com/docmirror/dev-sidecar/blob/7710cd56cce760c708f30b01d2d4056eb8c402d5/packages/core/src/modules/plugin/index.js#L1-L18","documentation":"Warning logged by the free_eye getter in modules/plugin/index.js when require('./free-eye') throws. free-eye is an ESM module consumed via CJS require() (unwrapping .default); in Node SEA single-executable builds the module cannot be packaged/required, so the getter degrades gracefully: it logs this warning and returns null, which causes expose.js to register the plugin as disabled instead of crashing startup.","triggerScenarios":"Any access to modules.plugin.free_eye (during expose.js startup or direct module access) where require('./free-eye') fails — SEA builds without the ESM asset, missing free-eye directory after an incomplete install, or an error thrown while evaluating the free-eye module (its dependencies absent or incompatible).","commonSituations":"Running the packaged SEA standalone executable where free-eye was never bundled; a corrupted or partial pnpm install that omitted the free-eye subfolder/dependencies; a Node version mismatch breaking the ESM/CJS interop for that module.","solutions":["If running the SEA build, this is expected degradation — ignore the warning or don't rely on free-eye in standalone builds.","Reinstall dependencies (pnpm install from repo root) to restore the free-eye module and its dependencies.","Verify packages/core/src/modules/plugin/free-eye exists and loads under your Node version (Node 22.x recommended); fix version or module resolution if not.","Read the logged e.message for the root require() failure and address it (missing file, syntax error, or missing dependency)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"let freeEye = null\ntry { freeEye = require('@docmirror/dev-sidecar/src/modules/plugin/free-eye').default } catch (e) { /* unavailable */ }\nif (freeEye == null) console.warn('free-eye not available in this environment')","typeGuard":"function isFreeEyeAvailable(mods) {\n  try { return mods?.plugin?.free_eye != null } catch { return false }\n}","tryCatchPattern":"try {\n  const freeEye = modules.plugin.free_eye\n  if (freeEye) await startFreeEye(freeEye)\n} catch (e) {\n  console.warn('free-eye unavailable, continuing without it:', e.message)\n}","preventionTips":["In SEA/standalone builds, treat free-eye as optional and guard every access.","Run Node 22.x and a complete pnpm install so the ESM module and deps resolve.","If you see this warning, expect the companion '插件不可用' stub behavior and a disabled plugin.","Check the logged e.message to distinguish SEA packaging limits from broken installs."],"tags":["plugin","free-eye","sea","esm-cjs-interop","degraded-mode"],"backgroundTag":"plugin-module-unavailable","analyzedSha":"7710cd56cce760c708f30b01d2d4056eb8c402d5","analyzedAt":"2026-08-31T22:07:07.234Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}