volta icon indicating copy to clipboard operation
volta copied to clipboard

Could not read from file .yarn/__virtual__

Open ctforcp opened this issue 1 year ago • 4 comments

I used yarn to install dependencies, and then when running yarn dev, the following error occurred. the installation method from the official Vue 3 documentation.

X [ERROR] Could not read from file: E:/manka/.yarn/__virtual__/vue-virtual-3f34f26dc5/5/C:/Users/ka/AppData/Local/Yarn/Berry/cache/vue-npm-3.4.37-df3a8a3302-10c0.zip/node_modules/vue/dist/vue.runtime.esm-bundler.js

ctforcp avatar Aug 11 '24 03:08 ctforcp

That doesn’t appear to involve Volta at all, actually. Can you provide a bit more detail as to why you think it’s being affected by Volta in some way? Thanks!

chriskrycho avatar Aug 11 '24 14:08 chriskrycho

same problem for me : steps to reproduce :

mkdir volta_xp
cd volta_xp
volta install node
volta install yarn
 yarn create vite -> create vue js project volta_xp
cd volta_xp
yarn
yarn dev

try to create same project with npm work

netchose avatar Aug 23 '24 08:08 netchose

it's a Vite issue : https://github.com/vitejs/vite/issues/15801

last commands on d drive fail , same commands on c drive works

netchose avatar Aug 23 '24 09:08 netchose

the next way fix my issue

Could not read from file: D:/projects/vuejs-v3/vue-estore/.yarn/virtual/vue-router-virtual-897d8f9c7d/5/C:/xxx/xxx/AppData/Local/Yarn/Berry/cache/vue-router-npm-4.5.0-eade46eba9-10c0.zip/node_modules/vue-router/dist/vue-router.mjs

  1. add .yarnrc.yml to root of the project
  2. add content to file

enableGlobalCache: false cacheFolder: "./.yarn/cache" cacheMigrationMode: "always" deferredVersionFolder: "./.yarn/versions" enableImmutableCache: false

  1. run yarn
  2. run yarn dev

evheniyrz avatar Jan 27 '25 12:01 evheniyrz