You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Vite on a drive that is a subst drive. In my example, I have a folder:
This is subst'd to create a new drive letter:
> subst p: D:\courses\ps\Tailwind
I have two repros with a plain Vite Vue project and a Vite React project. Same issue for both. See the logs for what happens when I run on the subst drive (it works on the raw drive fine)
Similar problem on Vue. Notice the paths say .d:/ as the beginning which I think is the issue.
P:\vite-bug\vite-subst-bug-react>npm run dev
> vite-subst-bug-react@0.0.0 dev
> vite
vite v2.9.9 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 387ms.
✘ [ERROR] Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/index.js"
dep:react:1:23:
1 │ export default require("./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/index.js");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react-dom/client.js"
dep:react-dom_client:1:23:
1 │ export default require("./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react-dom/client.js");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
✘ [ERROR] Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/jsx-dev-runtime.js"
dep:react_jsx-dev-runtime:1:23:
1 │ export default require("./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/jsx-dev-runtime.js");
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4:58:41 PM [vite] error while updating dependencies:
Error: Build failed with 3 errors:
dep:react:1:23: ERROR: Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/index.js"
dep:react-dom_client:1:23: ERROR: Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react-dom/client.js"
dep:react_jsx-dev-runtime:1:23: ERROR: Could not resolve "./D:/courses/PS/Tailwind/vite-bug/vite-subst-bug-react/node_modules/react/jsx-dev-runtime.js"
at failureErrorWithLog (P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:1603:15)
at P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:1249:28
at runOnEndCallbacks (P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:1034:63)
at buildResponseToResult (P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:1247:7)
at P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:1356:14
at P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:666:9
at handleIncomingPacket (P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:763:9)
at Socket.readFromStdout (P:\vite-bug\vite-subst-bug-react\node_modules\esbuild\lib\main.js:632:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
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 https://github.com/vuejs/core instead.
Describe the bug
When using Vite on a drive that is a subst drive. In my example, I have a folder:
This is subst'd to create a new drive letter:
I have two repros with a plain Vite Vue project and a Vite React project. Same issue for both. See the logs for what happens when I run on the subst drive (it works on the raw drive fine)
Similar problem on Vue. Notice the paths say
.d:/
as the beginning which I think is the issue.Reproduction
https://github.com/shawnwildermuth/vite-bug
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: