vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.27k stars 6.15k forks source link

[vite] Pre-transform error: Failed to load url #17283

Open ericson949 opened 5 months ago

ericson949 commented 5 months ago

Describe the bug

in my vite 5 project, after we merge branch with new file, vite #DEV crash, and I have to stop and restard #DEV to new to be resolved by vite

Reproduction

npm create vite@latest

Steps to reproduce

System Info

12:33:16 [vite] Pre-transform error: Failed to load url /front-app/ui/dashboard/preparatory-phase/grid-configuration-state/mo-esg-ti/grid/index/ListMoEsgTI.tsx (resolved
hase/grid-configuration-state/mo-esg-ti/grid/index/ListMoEsgTI.tsx) in C:/laragon/www/calcul-couts/front-app/assets/css/index.css. Does the file exist? (x2)

Used Package Manager

pnpm

Logs

No response

Validations

wangrongding commented 1 day ago

I also encountered this problem. It seems that it will occur if the path is too long.

wangrongding commented 1 day ago

If I use yarn as the package manager, there is no problem. However, as long as I use pnpm, for example, if my dependency is downloaded from a remote git repository, there will be a problem because pnpm will cause a very long path in the development environment.

package.json:

{
  "dependencies": {
    "@tools/odyssey": "git+https://gitlab.xxx.cn/xxxxxxx-xxxxx/xxxxxx-core.git#v0-24102502",
  }
}
wangrongding commented 1 day ago

image