[GH-ISSUE #189] Raise Cannot find module after access local dev server web page. #43

Closed
opened 2026-05-06 12:36:47 +02:00 by BreizhHardware · 1 comment

Originally created by @laiqun on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/189

Cannot find module '\node_modules.pnpm\validator@13.15.26\node_modules\validator\es\lib\util\assertString' imported from \node_modules.pnpm\validator@13.15.26\node_modules\validator\es\lib\isEmail.js

Originally created by @laiqun on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/189 Cannot find module '\node_modules\.pnpm\validator@13.15.26\node_modules\validator\es\lib\util\assertString' imported from \node_modules\.pnpm\validator@13.15.26\node_modules\validator\es\lib\isEmail.js
Author
Owner

@laiqun commented on GitHub (Feb 28, 2026):

It doesn't work when I have added it to ssr noExternal .

import { defineConfig } from "vite";
import vinext from "vinext";

export default defineConfig({
  plugins: [vinext()],
  ssr: {
    // Force validator through Vite's transform pipeline to fix ESM resolution
    // Without this, validator/es/lib/isEmail.js fails to resolve assertString.js
    noExternal: ["validator"],
  },
});
<!-- gh-comment-id:3977402982 --> @laiqun commented on GitHub (Feb 28, 2026): It doesn't work when I have added it to ssr noExternal . ```typescript import { defineConfig } from "vite"; import vinext from "vinext"; export default defineConfig({ plugins: [vinext()], ssr: { // Force validator through Vite's transform pipeline to fix ESM resolution // Without this, validator/es/lib/isEmail.js fails to resolve assertString.js noExternal: ["validator"], }, }); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#43
No description provided.