Dependencies are not resolved correctly when start vite server in child packages in monorepo
See original GitHub issueDescribe the bug
The source file
request is broke when debugging.
Can it be scanned recursively when it is not found in the current node_modules
directory?
Reproduction
- using
chrome devtools Sources CallStack
to debug function’ - click
jump to the next function call
. It will jump tonode_modules/.vite/xxx
(whose source file is provide by../../node_modules/xxx
). - Vite server didn’t correctly resolve dependcies which cause request file content return
404
and can not continue debug.
System Info
vite: 2.4.2
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How we configured pnpm and Turborepo for our monorepo
Intro. 12 months ago, we had 10+ npm packages in individual repositories. Things started to get inconsistent and out of hand.
Read more >A guide through The Wild Wild West of setting up a mono repo ...
Let's start by installing Lerna as a dev dependency of your project npx lerna init ... The lerna run command will run in...
Read more >TypeScript Monorepos with Yarn - Semaphore CI
For instance, say we have two packages, “child” and “parent”. The child is easy to compile since it has no other dependencies:
Read more >How to Create a React Typescript Monorepo with Git ...
To start, we need a packages directory to hold the different projects in our monorepo. Your structure should begin looking like this:.
Read more >Improve repo management with moon - LogRocket Blog
This might not be the best solution if you don't properly manage such ... commands that are run as child processes; Dependency graphs:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 on this issue
Running into a similar situation using PNPM workspaces + Vite (latest) + aws-amplify-ui libraries.
It’s a big pain :-\
Hi I’d like to take a look at the issue, but I can’t seem to get the behaviour as described in the reproduction step. If someone can provide a simple pnpm reproduction repro, and some specific keys to look for. That would be helpful to track down the issue.