Skip to content

fix(examples): add the required peer deps of @tanstack/router-devtools-core and vite-tsconfig-paths #4201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antitoxic
Copy link

@tanstack/router-devtools-core which is a dependency of @tanstack/react-router-devtools have 2 missing peer dependencies in the start-basic example:

  1. @tanstack/router-core I used the version of other @tanstack/* deps
  2. tiny-invariant I used the version that @tanstack/router-devtools-core specifies

vite-tsconfig-paths has 1 missing peer dependency: vite. I copied the version from react basic example.

I found that while doing a tanstack start POC using the breakproof repo template where the automatic peer dependency installation is disabled.

I can apply the same/similar fixes for other examples if you OK this.

@@ -12,6 +12,7 @@
"@tanstack/react-router": "^1.120.5",
"@tanstack/react-router-devtools": "^1.120.6",
"@tanstack/react-start": "^1.120.5",
"@tanstack/router-core": "^1.120.5",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be necessary as it is a dep of @tanstack/react-router

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right that, this is not needed in default npm setup, but it is necessary in the setup our company and others like it could be using:

@tanstack/react-router-devtools requires @tanstack/router-core as a peer and if you use a stricter dependency manager like pnpm it means that the implicit dependencies of @tanstack/react-router are not shared with the rest of your dependencies, a.k.a. @tanstack/react-router-devtools doesn't have access to the dependencies of @tanstack/router-core.

This is meaningful and intentional for portability, so that developers need to declare what dependencies they use, and not be able to import some implicit dependency of a dependency.

Does it make sense? I can try to rephrase if i wasn't able to express very well.

@schiller-manuel
Copy link
Contributor

appreciate the effort, we should hold this back until we merge alpha in main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants