-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
pnpm/pnpm
#8557Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Description
Describe the bug
Since upgrading to pnpm v9, Vite has failed to load packages installed from Git repo.
Error like this
vite:load 5.98ms [fs] /main.js +0ms
vite:resolve 6.61ms uuid-mirror -> /Users/kongdev/Workspace/demo/vite-issue/node_modules/.pnpm/uuid@git+https+++gitee.com+kongdev+uuid.git#da189d1792993d0da4b5008ea98c5ef48896739c/node_modules/uuid/dist/esm-browser/index.js +29ms
vite:import-analysis 15.07ms [1 imports rewritten] main.js +0ms
vite:transform 24.05ms /main.js +0ms
3:06:02 PM [vite] Pre-transform error: Failed to load url /node_modules/.pnpm/uuid@git+https+++gitee.com+kongdev+uuid.git?import#da189d1792993d0da4b5008ea98c5ef48896739c/node_modules/uuid/dist/esm-browser/index.js (resolved id: /Users//kongdev/Workspace/demo/vite-issue/node_modules/.pnpm/uuid@git+https+++gitee.com+kongdev+uuid.git#da189d1792993d0da4b5008ea98c5ef48896739c/node_modules/uuid/dist/esm-browser/index.js) in /Users//kongdev/Workspace/demo/vite-issue/main.js. Does the file exist?Repos on Github or Gitlab exhibit no issues, yet those on self-hosted services or other Git providers encounter problems.
It seems there is # in the file path that may be causing the issue. logic here
Reproduction
https://github.com/kong-dev/vite-issue
Steps to reproduce
The repository above is a minimal reproduction including 2 dependencies:
- 'uuid' from the npm registry
- 'uuid-mirror' from the mirrored Git repo
Steps:
- Install pnpm v9
- Clone the repo above
- Run
pnpm install - Start the dev server by running
pnpm run dev - Access in the browser
System Info
System:
OS: macOS 14.5
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 418.56 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
pnpm: 9.3.0 - /usr/local/bin/pnpm
Browsers:
Chrome: 126.0.6478.57
Safari: 17.5
npmPackages:
vite: ^5.2.13 => 5.2.13Used Package Manager
pnpm
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 vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)