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
From beta.57 starting vite in dev mode throw an error. It works in beta.56. The bug still present in beta.59.
Reproduction
npm init @vitejs/app runtime -- --template react
cd runtime
upgrade vite version in package.json
yarn install
yarn dev
System Info
vite version: beta.59
Operating System: Windows
Node version: v12
Package manager (npm/yarn/pnpm) and version: Yarn 2 PnP
Logs (Optional if provided reproduction)
Pre-bundling dependencies:
react
react-dom
(this will be run only when your dependencies or config have changed)
> dep:react-dom: error: Could not resolve "../.yarn/$$virtual/react-dom-virtual-b6e8a2f47c/0/cache/react-dom-npm-17.0.1-588d0088ca-6a70028fbe.zip/node_modules/react-dom/index.js"
1 │ import d from "../.yarn/$$virtual/react-dom-virtual-b6e8a2f47c/0/cache/react-dom-npm-17.0.1-588d0088ca-6a70028fbe.zip/node_modules/react-dom/index.js";export default d;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> error: Cannot read directory "../.yarn/cache/react-npm-17.0.1-98658812fc-a76d86ec97.zip": not a directory
> dep:react: error: Could not resolve "../.yarn/cache/react-npm-17.0.1-98658812fc-a76d86ec97.zip/node_modules/react/index.js"
1 │ import d from "../.yarn/cache/react-npm-17.0.1-98658812fc-a76d86ec97.zip/node_modules/react/index.js";export default d;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error when starting dev server:
Error: Build failed with 3 errors:
error: Cannot read directory "../.yarn/cache/react-npm-17.0.1-98658812fc-a76d86ec97.zip": not a directory
dep:react:1:14: error: Could not resolve "../.yarn/cache/react-npm-17.0.1-98658812fc-a76d86ec97.zip/node_modules/react/index.js"
dep:react-dom:1:14: error: Could not resolve "../.yarn/$$virtual/react-dom-virtual-b6e8a2f47c/0/cache/react-dom-npm-17.0.1-588d0088ca-6a70028fbe.zip/node_modules/react-dom/index.js"
at failureErrorWithLog (/home/lege/Documents/projects/vite-app/.yarn/unplugged/esbuild-npm-0.8.36-2aef594cc9/node_modules/esbuild/lib/main.js:969:15)
at buildResponseToResult (/home/lege/Documents/projects/vite-app/.yarn/unplugged/esbuild-npm-0.8.36-2aef594cc9/node_modules/esbuild/lib/main.js:767:32)
at /home/lege/Documents/projects/vite-app/.yarn/unplugged/esbuild-npm-0.8.36-2aef594cc9/node_modules/esbuild/lib/main.js:819:20
at handleIncomingPacket (/home/lege/Documents/projects/vite-app/.yarn/unplugged/esbuild-npm-0.8.36-2aef594cc9/node_modules/esbuild/lib/main.js:566:9)
at Socket.readFromStdout (/home/lege/Documents/projects/vite-app/.yarn/unplugged/esbuild-npm-0.8.36-2aef594cc9/node_modules/esbuild/lib/main.js:482:7)
at Socket.emit (events.js:209:13)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:286:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
The text was updated successfully, but these errors were encountered:
It still doesnt work in beta.60,i think you made a mistake in esbuildDepPlugin.ts:150, but iam not sure. If i switch undefined and root it is working. resolveDir: isRunningWithYarnPnp ? undefined : root -> resolveDir: isRunningWithYarnPnp ? root : undefined
Describe the bug
From
beta.57
starting vite in dev mode throw an error. It works inbeta.56
. The bug still present inbeta.59
.Reproduction
npm init @vitejs/app runtime -- --template react
cd runtime
upgrade vite version in package.json
yarn install
yarn dev
System Info
vite
version: beta.59Logs (Optional if provided reproduction)
The text was updated successfully, but these errors were encountered: