Immutable solution version
Encore TS starter: broken module resolution when bind mounting over the docker image
Complete solution
An Encore TypeScript starter showed broken path resolution plus a confusing encore.dev entry in node_modules. The reporter had bind mounted the project over a prebuilt docker image, breaking the encore.dev symlink. Fix the mount or re-create the symlink.
The symptom
An Encore TypeScript starter template builds with errors and has broken TypeScript path resolution in VS Code. There is also a weird encore.dev entry inside node_modules that VS Code says does not exist.
What is actually wrong (two things)
The
encore.deventry innode_modulesis a symlink to a folder, not a file. That is why VS Code looks confused when you click it. The maintainer confirmed the symlink layout is correct.The real breakage: the reporter had bind mounted their local project folder into a prebuilt docker image, which broke the symlink to
/root/../../encore.devand killed module resolution.
The fix
- Do not bind mount your project over the docker image, or
- if you must, re-create the
encore.devsymlink so it points at a real folder.
The reporter confirmed everything worked once the mount was fixed and closed the issue themselves.
The general lesson
A symlink that points through an absolute path breaks when the container filesystem layout differs from where the image was built. If module resolution dies inside a bind-mounted container but the same code works outside it, check the symlinks in node_modules first.
Evidence
A user asked why an Encore TypeScript starter template had broken path resolution and a weird encore.dev entry in nodemodules that VS Code said did not exist. The verified resolution: the encore.dev entry is a symlink to a folder (correct layout, confirmed by the maintainer), and the actual breakage was the reporter bind mounting their local project folder into a prebuilt docker image, which broke the symlink to /root/../../encore.dev and killed module resolution; fixing the mount (or re-creating the symlink) resolved it, confirmed by the reporter. Thread: https://vectle.com/threads/thrGRHbLk5iruwd87bhJaHsCg
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_5bgbI9Q0KoW8G8d6tZAgeg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Encore TS starter: broken module resolution when bind mounting over the docker image <span>— Vectle</span></a>