question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to the run vue app with latest vite version 2.9.0 and above

See original GitHub issue

Describe the bug

Hello team, I’ve created a latest vue project using below command, npm init vue@latest and project was created, in the latest code vite version installed as “vite”: “^2.9.5”.

I tried all the versions from 2.9.0 to 2.9.6, but didn’t worked. When run the below command,

npm run dev

I’m getting bellow error,

image

I tried all the below versions. I got the same above error,

image

But when I build the application it is working fine. like,

npm run build

Finally I downgraded the vite version to (“vite”: “2.8.6”), the app is working properly like,

image

Reproduction

https://github.com/sadashivm/vue3-latest

System Info

OS - Windows 10,
Node - v16.14.2
npm - 8.7.2

Used Package Manager

npm

Logs

12:58:28 pm [vite] error while updating dependencies:
Error: EPERM: operation not permitted, rename 'D:/Vue/vue3-latest/node_modules/.vite/processing' -> 'D:/Vue/vue3-latest/node_modules/.vite/deps'
    at Object.renameSync (node:fs:980:3)
    at commitProcessingDepsCacheSync (D:\Vue\vue3-latest\node_modules\vite\dist\node\chunks\dep-8db0e223.js:37269:21)
    at Object.commit (D:\Vue\vue3-latest\node_modules\vite\dist\node\chunks\dep-8db0e223.js:37261:13)
    at commitProcessing (D:\Vue\vue3-latest\node_modules\vite\dist\node\chunks\dep-8db0e223.js:58587:34)
    at runOptimizer (D:\Vue\vue3-latest\node_modules\vite\dist\node\chunks\dep-8db0e223.js:58625:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:24 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
tony19commented, May 7, 2022

@patak-dev Oddly, my machine does not produce an error in the fs.rename callback (er is always null for me), even with antivirus enabled, so I cannot verify the change in #8036 (although that change appears correct to me).

It seems replacing fs.renameSync() with the promisify-ied fs.rename() was enough to resolve the problem on my machine.

1reaction
mattnathancommented, May 6, 2022

I totally agree, don’t want to make life worse for most just for me. Thanks for your time on this so far.

I’ll have a go at writing a PR, but I won’t be able to look into this until at least w/c 23rd unfortunately. I have a manual work around for now: If the error happens, manually delete node_modules/.vite/deps and manually rename node_modules/.vite/processing -> deps, restart vite. Luckily I don’t change dependencies that often.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run the vue app - Get Help
I tried to create a new vue app using below command, npm init vue@latest. The folder is created but when I run the...
Read more >
Unable to run vue application - Stack Overflow
Finally downgraded vite version to 2.8.6. then it is working properly. Only have an issue from vite version 2.9.0 and above.
Read more >
Getting Started - Vite
Then go to your Vite based project and run pnpm link --global vite (or the package manager that you used to link vite...
Read more >
Can't install @vitejs/plugin-vue - Laracasts
Hi, I've just installed a fresh version of Laravel 9 and wanted to use Vite and Vue, but when I do @vitejs/plugin-vue I've...
Read more >
How to Deploy a Vue 3 and Vite App on Netlify - YouTube
ℹ️ AboutWhen starting a new project, you have a lot on your mind that you want to work on and build. The last...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found