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

vite fails with https dependencies installed with pnpm9 #17805

Closed
7 tasks done
dcaillibaud opened this issue Aug 1, 2024 · 1 comment
Closed
7 tasks done

vite fails with https dependencies installed with pnpm9 #17805

dcaillibaud opened this issue Aug 1, 2024 · 1 comment

Comments

@dcaillibaud
Copy link

Describe the bug

Since pnpm upgrade from v8 to v9, dependencies files can have # in their name, and vite fails to compile them in some cases. It seems to occurs when a dependency is declared with the repo url (neither official npm package nor github project) and this dependency import another one also declared with its repo url.

Here is the same issue as #16597, but with a minimal repo to reproduce the pb.

Reproduction

https://github.com/dcaillibaud/bug-vite-pnpm9

Steps to reproduce

git clone https://github.com/dcaillibaud/bug-vite-pnpm9.git
cd bug-vite-pnpm9
npx pnpm@9 install
vite build

You can test the build with ./test.sh 8 or ./test.sh 9, or just install dependencies with pnpm 8 (./install.sh 8) or pnpm 9 (./install.sh 9) then try vite build --debug or vite

System Info

System:
    OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 14.33 GB / 31.09 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 20.5.1 - /usr/bin/node
    npm: 10.7.0 - /usr/bin/npm
    pnpm: 8.15.8 - /usr/bin/pnpm
  Browsers:
    Chrome: 127.0.6533.88
    Chromium: 126.0.6478.182
  npmPackages:
    vite: ^5.3.5 => 5.3.5 


### Used Package Manager

pnpm

### Logs

<details>
<summary>main branch with pnpm 9, build KO</summary>

```shell
error during build:
[vite]: Rollup failed to resolve import "sesajstools/dom" from "/home/sesamath/projets/git/bug-vite-pnpm9/node_modules/.pnpm/instrumenpoche@git+https+++git.sesamath.net+sesamath+instrumenpoche.git#26796a8b1fab14a77a463309abdb887baf3678bd/node_modules/instrumenpoche/src/iepLoadPromise.js".

It's ok with pnpm 8 (try ./test.sh 8) or in branch sampleOk

Validations

@hi-ogawa
Copy link
Collaborator

hi-ogawa commented Aug 2, 2024

It looks like a duplicate of #17459

@hi-ogawa hi-ogawa closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants