Reputation: 13
When I create a new Vue project using CLI tools, I got the 4058 error, here's my code:
Vue CLI v4.5.6
? Please pick a preset: Default ([Vue 2] babel, eslint)
Vue CLI v4.5.6
✨ Creating project in D:\PP\Others\StaticBlog\static-blog.
� Initializing git repository...
⚙️ Installing CLI plugins. This might take a while...
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path D:\PP\Others\StaticBlog\static-blog\node_modules\@babel\parser
npm ERR! dest D:\PP\Others\StaticBlog\static-blog\node_modules\@babel\.parser.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'D:\PP\Others\StaticBlog\static-blog\node_modules\@babel\parser' -> 'D:\PP\Others\StaticBlog\static-blog\node_modules\@babel\.parser.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Echo\AppData\Roaming\npm-cache\_logs\2020-09-24T04_43_39_501Z-debug.log
ERROR command failed: npm install --loglevel error
It seems that some files didn't install correctly, so I delete directories npm
and npm_cache
to reinstall, but still got the same. Then I tried to install @babel\parser
manually, same.
I'm puzzled, please give me some helpful suggestions!
Here's the information that may needed:
OS: Win 7
npm version: 6.14.6
Node.js version: v12.18.4
Upvotes: 1
Views: 867
Reputation: 11
I meet this issue also, and I using "-m yarn" option to create project successfully.
vue create your-project -m yarn
Upvotes: 1
Reputation: 105
I had the same error, finally got it working by installing Yarn and selecting Yarn as my dependency manager in the vue ui project setup (which I had never used before).
Steps I used to fix this issue:
This is what finally worked for me, and now my Vue.js project is working properly with Babel, Vue Router, Vuex, etc. I hope this solution works for you as its very frustrating not finding a solution out there yet.
Upvotes: 0