You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vite: /ns/m dev server 404s on pnpm-isolated transitive dependencies #11470
Build-time / dev-server error in @nativescript/vite (observed on 8.0.11, same code on main).
Description
Under pnpm's nodeLinker: isolated, a package's transitive dependency lives in that package's own node_modules (or .pnpm/.../node_modules/), not under the app root or the workspace root. The /ns/m module server only probes projectRoot and workspaceRoot (resolveCandidateFilePath in hmr/server/websocket-module-specifiers.ts), so requests for such files 404 and the dev-session boot fails:
Repro: a monorepo where an app imports a workspace package whose own dependency is a NativeScript plugin (e.g. @octane-xplat/gif → @nativescript-community/ui-image) — the app's node_modules contains no ui-image, so /ns/m/node_modules/@nativescript-community/ui-image/index-common.js can't resolve from either probed root.
Suggested fix
Probe each workspace package'snode_modules directory (or use proper module resolution from the referring file's location) as a fallback before 404. In our tree, adding that fallback plus platform-suffixed candidates (.ios.js, .android.js) to the node_modules probe unblocked the whole module graph.
Environment: pnpm nodeLinker: isolated, @nativescript/vite 8.0.11, Vite 8.3, iOS simulator.
Activity
aleclarson commentedon Sep 28, 2026
Minimal reproduction: https://github.com/aleclarson/repro/tree/nativescript-11470 — a single Node script (
npm install && node repro.mjs) that exercises the exact upstream function/code path and prints the failure.