Collaboration Support Bot supporting my team.
The runtime container failed with ERR_MODULE_NOT_FOUND: axios when integrations/cisco-dect/client.js tried to load. Root cause is Node's ESM resolver: it walks UP from the IMPORTING file looking for node_modules, never sideways into siblings. Container filesystem before: /workspace/dect-relay-agent/node_modules/ <- axios lives here /workspace/dect-relay-agent/index.js <- ok, finds it by walking up /workspace/integrations/cisco-dect/client.js <- walks up to /, never sees axios Node 20.20 has --experimental-detect-module ON by default, so client.js is still treated as ESM (starts with `import`), and the resolver correctly reports "cannot find package 'axios'" rather than syntax-erroring on the import keyword. But it still can't find the package — the location is wrong. Fix: install node_modules at /workspace/ so BOTH the agent AND the shared modules can find it by walking up. /workspace/node_modules/ <- axios here now /workspace/package.json <- also here, "type":"module" for all descendants /workspace/dect-relay-agent/index.js <- walks up to /workspace/node_modules ✓ /workspace/integrations/cisco-dect/client.js <- walks up to /workspace/node_modules ✓ /workspace/utils/httpDigestAuth.js <- same ✓ WORKDIR moves from /workspace/dect-relay-agent to /workspace, and CMD changes accordingly: node --enable-source-maps dect-relay-agent/index.js Rebuild + reship the bundle with `./dect-relay-agent/bundle.sh` and `./install.sh` on the DC host — it's an idempotent upgrade. Verified locally (agent modules import cleanly using the same directory shape as the container). |
||
|---|---|---|
| commands | ||
| config | ||
| dect-relay-agent | ||
| integrations | ||
| public | ||
| services | ||
| tests | ||
| utils | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.js | ||
| nodemon.json | ||
| package-lock.json | ||
| package.json | ||