Skip to content
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

V6 regression: dependency optimizer pre-bundler did not re-run after lock file change #19118

Open
7 tasks done
smeng9 opened this issue Jan 2, 2025 · 0 comments · May be fixed by #19119
Open
7 tasks done

V6 regression: dependency optimizer pre-bundler did not re-run after lock file change #19118

smeng9 opened this issue Jan 2, 2025 · 0 comments · May be fixed by #19119

Comments

@smeng9
Copy link
Contributor

smeng9 commented Jan 2, 2025

Describe the bug

I manually adjusted the package versions in package.json file and then run $ yarn to install the latest packages with bug fix.

Then I started $ yarn dev, however I am still using an older package with bug. The optimize dependency is not working, and this caused some confusion in our team.

Reproduction

https://stackblitz.com/edit/vitejs-vite-swnnga3g?file=index.html&terminal=dev

Steps to reproduce

Install the dependency, then open and close vite dev server.

Next upgrade or downgrade the react version 18->19 in package.json

Install the dependency, then open and close vite dev server again.

Check the folder content in node_modules/.vite/deps and it did not change despite the version is updated.

Additional info: we configured the installStatePath in yarn to be a non-default one so the dependency info can be automatically collected by our logging system which monitors dependency confusion attacks.

Work around: use --force flag

Regression seems get introduced in #18560

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M2
    Memory: 82.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.12.0 - /usr/local/bin/pnpm
  Browsers:
    Safari: 17.5

Used Package Manager

yarn

Logs

No response

Validations

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

Successfully merging a pull request may close this issue.

1 participant