Unable to the run vue app with latest vite version 2.9.0 and above
See original GitHub issueDescribe 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,
I tried all the below versions. I got the same above error,
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,
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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:24 (20 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patak-dev Oddly, my machine does not produce an error in the
fs.rename
callback (er
is alwaysnull
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 thepromisify
-iedfs.rename()
was enough to resolve the problem on my machine.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 renamenode_modules/.vite/processing -> deps
, restart vite. Luckily I don’t change dependencies that often.