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

Failure to load deps when launched from a windows SMB file share #5258

Closed
7 tasks done
roobscoob opened this issue Oct 12, 2021 · 2 comments
Closed
7 tasks done

Failure to load deps when launched from a windows SMB file share #5258

roobscoob opened this issue Oct 12, 2021 · 2 comments
Labels
windows only wontfix This will not be worked on

Comments

@roobscoob
Copy link

Describe the bug

When launching from a SMB or file share on windows, it fails to load deps.

Reproduction

The issue here is obvious, open a SMB or file share on windows, then attempt to run vite.

System Info

System:
    OS: Windows 10 10.0.18362
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 29.59 GB / 63.94 GB
  Binaries:
    Node: 16.6.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.17.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 94.0.4606.81
    Edge: Spartan (44.18362.449.0)
    Internet Explorer: 11.0.18362.1

Used Package Manager

npm

Logs

error when starting dev server:
Error: ENOENT: no such file or directory, open '/NAS/main/projects/simplemc/webdist/node_modules/svelte/transition/index.mjs'
    at Object.openSync (node:fs:582:3)
    at Object.readFileSync (node:fs:450:35)
    at optimizeDeps (M:\projects\simplemc\webdist\node_modules\vite\dist\node\chunks\dep-1be34a63.js:71583:42)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOptimize (M:\projects\simplemc\webdist\node_modules\vite\dist\node\chunks\dep-1be34a63.js:75390:48)
    at async Server.httpServer.listen (M:\projects\simplemc\webdist\node_modules\vite\dist\node\chunks\dep-1be34a63.js:75406:21)
ERROR: "dev:vite" exited with 1.

Validations

@PwrSrg
Copy link

PwrSrg commented Feb 24, 2022

Confirmed.

PS W:\Sandbox\Vite\vite-app> npm run dev

> src@0.0.0 dev
> vite

Pre-bundling dependencies:
  react
  react-dom
  react/jsx-dev-runtime
(this will be run only when your dependencies or config have changed)
error when starting dev server:
Error: ENOENT: no such file or directory, open '/NAS/Web/Sandbox/Vite/vite-app/node_modules/react/index.js'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at optimizeDeps (W:\Sandbox\Vite\vite-app\node_modules\vite\dist\node\chunks\dep-971d9e33.js:55810:42)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOptimize (W:\Sandbox\Vite\vite-app\node_modules\vite\dist\node\chunks\dep-971d9e33.js:56631:44)
    at async Server.httpServer.listen (W:\Sandbox\Vite\vite-app\node_modules\vite\dist\node\chunks\dep-971d9e33.js:56646:21)
PS W:\Sandbox\Vite\vite-app>

@sapphi-red
Copy link
Member

Closing because

  • I don't use SMB file share (and I guess all Vite team members doesn't) and it's quite difficult to fix this
  • this is quite an edge case (there's only one ":+1:"s)

My guess is that this is related to nodejs/node#7726 . We used to use fs.promises.realpath in some places. We now use safeRealpathSync in most places. So it might be already fixed or can be fixed by using them.

Fixing #10802 might fix this issue as a side-effect.

That said, if you create a PR and the complexity is small enough, we'll probably merge that PR.

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
@sapphi-red sapphi-red added wontfix This will not be worked on and removed pending triage labels Apr 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
windows only wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants