Skip to content

fix - #9

Open
arteck wants to merge 1 commit into
ipod86:mainfrom
arteck:main
Open

fix#9
arteck wants to merge 1 commit into
ipod86:mainfrom
arteck:main

Conversation

@arteck

@arteck arteck commented Aug 21, 2026

Copy link
Copy Markdown

Cannot start extension "agent-dvr.0": Error: Cannot find module 'iobroker.agent-dvr/lib/web.js' Require stack: - /opt/iobroker/node_modules/iobroker.web/build/main.js

Copilot AI lite review requested due to automatic review settings August 21, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses the startup failure of the web adapter integration by ensuring the AgentDVR web extension entrypoint resolves to an actually shipped JS file.

Changes:

  • Update io-package.json to load the web extension from build/web.js instead of the missing lib/web.js.
  • Add the compiled web extension output (build/web.js) and its sourcemap (build/web.js.map).
  • Disable ESLint and TypeScript checking for src/web.ts.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
src/web.ts Disables linting and TS checking for the web extension source file.
io-package.json Points webExtension to build/web.js so iobroker.web can require the module successfully.
build/web.js Adds the compiled web extension implementation that iobroker.web will load.
build/web.js.map Adds sourcemap for the compiled web extension.
Files not reviewed (1)
  • build/web.js: Generated file
Suppressed comments (1)

src/web.ts:2

  • /* eslint-disable */ and // @ts-nocheck disable all linting and all TypeScript checking for this file, which makes regressions in the web extension easy to miss. Prefer fixing the underlying TS issues (e.g., add explicit constructor parameter types and declare app/adapter/_route/_authHeader class fields) and, if needed, disable only the specific ESLint rules that are still problematic instead of turning everything off.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ipod86

ipod86 commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix! Before merging I dug into this a bit, and I don't think this is quite the right fix — let me explain what I found.

What I checked:

  • Diffing this PR directly against the current main (which hasn't moved since this PR's base commit, so nothing is stale here), the actual delta is small: io-package.json's webExtension changes from "lib/web.js" to "build/web.js", and lib/web.js gets renamed to src/web.ts (with /* eslint-disable */ and // @ts-nocheck added — the content itself is otherwise unchanged, so it's still plain JS under a .ts filename, not an actual TypeScript conversion), plus the compiled build/web.js + sourcemap get committed.

  • I can't reproduce the underlying error against the current (or even historical) codebase: lib/web.js exists, is correctly referenced by io-package.json, and is included in package.json's files array — all three have been true and consistent since commit 5c61f39 (2026-06-28, "feat(www): Web-UI mit Live-Grid..."), well before this PR was opened (2026-08-21).

  • lib/web.js was never part of the TypeScript build pipeline (it's not in tsconfig.json's include) — it's a deliberately standalone, plain-JS file that works without a build step, which is actually the more robust choice for GitHub-sideload installs (no prepare script runs on npm install github:..., so anything requiring compilation needs its build/ output committed — which src/main.tsbuild/main.js already does correctly here).

So I suspect this was a stale/broken local install on your end (e.g. from before June 28) rather than a bug still present in the adapter. Merging this as-is would move a working, simple, git-portable file into the build pipeline for no confirmed benefit, and add generated build artifacts to track going forward.

Could you confirm: which adapter version were you running when you hit this, and how was it installed (npm registry vs. a specific GitHub ref/tag)? If you can still reproduce this against current main, I'd like to understand the actual mechanism before merging a fix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants