Open
Description
Which project does this relate to?
Router
Describe the bug
When using Yarn PnP, the basic installation steps create an error that kills the Vite dev server:
$ yarn dev
♻️ Generating routes...
✅ Processed routes in 55ms
5:28:36 PM [vite] (client) Forced re-optimization of dependencies
VITE v6.2.1 ready in 447 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
✘ [ERROR] Could not resolve "tiny-invariant"
../../node_modules/.store/@tanstack-router-devtools-core-virtual-85598b6a68/package/dist/esm/BaseTanStackRouterDevtoolsPanel.js:3:22:
3 │ import invariant from "tiny-invariant";
╵ ~~~~~~~~~~~~~~~~
You can mark the path "tiny-invariant" 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/router-core"
../../node_modules/.store/@tanstack-router-devtools-core-virtual-85598b6a68/package/dist/esm/BaseTanStackRouterDevtoolsPanel.js:4:38:
4 │ import { rootRouteId, trimPath } from "@tanstack/router-core";
╵ ~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@tanstack/router-core" as external to exclude it from the bundle, which
will remove this error and leave the unresolved path in the bundle.
<project_path>/node_modules/.store/esbuild-npm-0.25.0-239cf019a2/package/lib/main.js:1477
let error = new Error(text);
^
Error: Build failed with 2 errors:
../../node_modules/.store/@tanstack-router-devtools-core-virtual-85598b6a68/package/dist/esm/BaseTanStackRouterDevtoolsPanel.js:3:22: ERROR: Could not resolve "tiny-invariant"
../../node_modules/.store/@tanstack-router-devtools-core-virtual-85598b6a68/package/dist/esm/BaseTanStackRouterDevtoolsPanel.js:4:38: ERROR: Could not resolve "@tanstack/router-core"
at failureErrorWithLog (<project_path>/node_modules/.store/esbuild-npm-0.25.0-239cf019a2/package/lib/main.js:1477:15)
at <project_path>/node_modules/.store/esbuild-npm-0.25.0-239cf019a2/package/lib/main.js:946:25
at <project_path>/node_modules/.store/esbuild-npm-0.25.0-239cf019a2/package/lib/main.js:1355:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Your Example Website or App
Will add on request
Steps to Reproduce the Bug or Issue
- Create a Yarn + Vite + React package
- Follow the steps from Quickstart exactly
- Run the Vite dev server
Expected behavior
Expected the dev server to start without error
Screenshots or Videos
No response
Platform
- OS: Linux
- Browser: N/A
- Versions:
"@tanstack/react-router": "^1.114.17",
"@tanstack/eslint-plugin-router": "^1.114.12",
"@tanstack/react-router-devtools": "^1.114.21",
"@tanstack/router-plugin": "^1.114.17",
Additional context
Will add a lot more detail if this is not immediately reproducible for you, just let me know