router: (devinxi) EISDIR: illegal operation on a directory, read

Which project does this relate to?

Start/Router

When running vite dev, I get the following two errors:

Update: I should’ve opened up two separate issues.

FIXED: Could not resolve "tanstack:server-fn-manifest

This has been fixed in the latest alpha.

✘ [ERROR] Could not resolve "tanstack:server-fn-manifest"

    ../../node_modules/.pnpm/@tanstack+start-server-core@1.120.4-alpha.21/node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js:4:30:
      4 │ import _serverFnManifest from "tanstack:server-fn-manifest";
        ╵                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "tanstack:server-fn-manifest" as external to exclude it from the bundle,
  which will remove this error and leave the unresolved path in the bundle.

Error: Build failed with 2 errors:
../../node_modules/.pnpm/@tanstack+start-server-core@1.120.4-alpha.21/node_modules/@tanstack/start-server-core/dist/esm/router-manifest.js:1:33: ERROR: Could not resolve "tanstack:start-manifest"
../../node_modules/.pnpm/@tanstack+start-server-core@1.120.4-alpha.21/node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js:4:30: ERROR: Could not resolve "tanstack:server-fn-manifest"
    at failureErrorWithLog (/Users/gunnartorfi/code/noona-os/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:1463:15)
    at /Users/gunnartorfi/code/noona-os/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:924:25
    at /Users/gunnartorfi/code/noona-os/node_modules/.pnpm/esbuild@0.25.4/node_modules/esbuild/lib/main.js:1341:9
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Then there’s another error just above ✅ Processed routes in 130ms:

♻️  Generating routes...
Error: EISDIR: illegal operation on a directory, read
    at Object.readFileSync (node:fs:442:20)
    at handleNode (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/@tanstack+start-plugin-core@1.120.4-alpha.23_@netlify+blobs@8.2.0_@tanstack+react-route_936f541478aff79aeaab882cae686bfe/node_modules/@tanst
ack/start-plugin-core/dist/esm/start-server-routes-plugin/plugin.js:163:42)
    at handleNode (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/@tanstack+start-plugin-core@1.120.4-alpha.23_@netlify+blobs@8.2.0_@tanstack+react-route_936f541478aff79aeaab882cae686bfe/node_modules/@tanst
ack/start-plugin-core/dist/esm/start-server-routes-plugin/plugin.js:194:15)
    at generator (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/@tanstack+start-plugin-core@1.120.4-alpha.23_@netlify+blobs@8.2.0_@tanstack+react-route_936f541478aff79aeaab882cae686bfe/node_modules/@tansta
ck/start-plugin-core/dist/esm/start-server-routes-plugin/plugin.js:215:11)
    at async generate (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/@tanstack+start-plugin-core@1.120.4-alpha.23_@netlify+blobs@8.2.0_@tanstack+react-route_936f541478aff79aeaab882cae686bfe/node_modules/@t
anstack/start-plugin-core/dist/esm/start-server-routes-plugin/plugin.js:23:7)
    at async PluginContext.buildStart (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/@tanstack+start-plugin-core@1.120.4-alpha.23_@netlify+blobs@8.2.0_@tanstack+react-route_936f541478aff79aeaab882cae686bfe
/node_modules/@tanstack/start-plugin-core/dist/esm/start-server-routes-plugin/plugin.js:49:7)
    at async Promise.all (index 7)
    at async EnvironmentPluginContainer.hookParallel (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/vite@6.3.5_@types+node@22.15.18_jiti@2.4.2_lightningcss@1.30.1_terser@5.39.0_tsx@4.19.4_yaml@2.7.1/node_m
odules/vite/dist/node/chunks/dep-DBxKXgDP.js:42159:5)
    at async EnvironmentPluginContainer.buildStart (file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/vite@6.3.5_@types+node@22.15.18_jiti@2.4.2_lightningcss@1.30.1_terser@5.39.0_tsx@4.19.4_yaml@2.7.1/node_mod
ules/vite/dist/node/chunks/dep-DBxKXgDP.js:42178:5)
    at async file:///Users/gunnartorfi/code/noona-os/node_modules/.pnpm/vite@6.3.5_@types+node@22.15.18_jiti@2.4.2_lightningcss@1.30.1_terser@5.39.0_tsx@4.19.4_yaml@2.7.1/node_modules/vite/dist/node/chunks/dep-DBxKXgDP
.js:38709:7 {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}

Your Example Website or App

https://github.com/gunnartorfis/tanstack-start-devinxi-repro

Steps to Reproduce the Bug or Issue

  1. Follow the upgrade guide to migrate from vinxi.
  2. Run vite dev

Expected behavior

We shouldn’t have an error.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 136

Additional context

“@tanstack/react-router”: “1.120.4-alpha.19”, “@tanstack/react-router-devtools”: “1.120.4-alpha.19”, “@tanstack/react-start”: “1.120.4-alpha.23”, “vite”: “^6.3.5”

Here’s my vite.config.ts:

import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
  plugins: [tsconfigPaths(), tanstackStart({})],
});

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 17 (3 by maintainers)

Commits related to this issue

Most upvoted comments

@gunnartorfis can you share a complete example repo?

Same for me:

$ vite dev --port 3001

♻️  Generating routes...
✅ Processed routes in 324ms
10:57:18 AM [vite] (client) Forced re-optimization of dependencies

  VITE v6.3.5  ready in 3499 ms

  ➜  Local:   http://localhost:3001/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
✘ [ERROR] Could not resolve "tanstack-start-server-fn-manifest:v"

    node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js:4:30:
      4 │ import _serverFnManifest from "tanstack-start-server-fn-manifest:v";
        ╵                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "tanstack-start-server-fn-manifest:v" as external to exclude it from the
  bundle, which will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "tanstack-start-router-manifest:v"

    node_modules/@tanstack/start-server-core/dist/esm/router-manifest.js:1:33:
      1 │ import { tsrStartManifest } from "tanstack-start-router-manifest:v";
        ╵                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "tanstack-start-router-manifest:v" as external to exclude it from the
  bundle, which will remove this error and leave the unresolved path in the bundle.

/Users/folyd/geddle/geddle-web/geddle/node_modules/esbuild/lib/main.js:1477
  let error = new Error(text);
              ^

Error: Build failed with 2 errors:
node_modules/@tanstack/start-server-core/dist/esm/router-manifest.js:1:33: ERROR: Could not resolve "tanstack-start-router-manifest:v"
node_modules/@tanstack/start-server-core/dist/esm/server-functions-handler.js:4:30: ERROR: Could not resolve "tanstack-start-server-fn-manifest:v"
    at failureErrorWithLog (/Users/folyd/geddle/geddle-web/geddle/node_modules/esbuild/lib/main.js:1477:15)
    at /Users/folyd/geddle/geddle-web/geddle/node_modules/esbuild/lib/main.js:946:25
    at /Users/folyd/geddle/geddle-web/geddle/node_modules/esbuild/lib/main.js:1355:9
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v22.14.0
error: script "dev" exited with code 1
        "@tailwindcss/vite": "^4.1.7",
        "@tanstack/react-query": "^5.76.1",
        "@tanstack/react-query-devtools": "^5.76.1",
        "@tanstack/react-router": "v1.121.0-alpha.11",
        "@tanstack/react-router-devtools": "v1.121.0-alpha.11",
        "@tanstack/react-router-with-query": "v1.121.0-alpha.11",
        "@tanstack/react-start": "v1.121.0-alpha.11",

Same issue

Error: Cannot resolve "tanstack:server-fn-manifest" from "D:\\Typescript\\test-cloudflare\\node_modules\\@tanstack\\start-server-core\\dist\\esm\\server-functions-handler.js" and externals are not allowed!


Error: Cannot resolve "tanstack:server-fn-manifest" from "D:\\Typescript\\test-cloudflare\\node_modules\\@tanstack\\start-server-core\\dist\\esm\\server-functions-handler.js" and externals are not allowed!  


undefined

error during build:
Error: Cannot resolve "tanstack:server-fn-manifest" from "D:\\Typescript\\test-cloudflare\\node_modules\\@tanstack\\start-server-core\\dist\\esm\\server-functions-handler.js" and externals are not allowed!
    at Object.resolveId (file:///D:/Typescript/test-cloudflare/node_modules/nitropack/dist/rollup/index.mjs:2013:17) 
    at async PluginDriver.hookFirstAndGetPlugin (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:22092:28)
    at async resolveId (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:20574:26)
    at async ModuleLoader.resolveId (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:21010:15)
    at async Object.resolveId (file:///D:/Typescript/test-cloudflare/node_modules/@rollup/plugin-commonjs/dist/es/index.js:600:10)
    at async PluginDriver.hookFirstAndGetPlugin (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:22092:28)
    at async resolveId (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:20574:26)
    at async ModuleLoader.resolveId (file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:21010:15)
    at async file:///D:/Typescript/test-cloudflare/node_modules/rollup/dist/es/shared/node-entry.js:21310:50
error: script "build" exited with code 1

//vite.config.ts

error: target:“cloudflare-module”

success: target:“node” ,“bun” ,…