vue.js - Vue CLI 创建项目时出现错误代码 4058
问题描述
当我使用 CLI 工具创建一个新的 Vue 项目时,我得到了 4058 错误,这是我的代码:
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
似乎有些文件没有正确安装,所以我删除了目录npm
并npm_cache
重新安装,但还是一样。然后我尝试@babel\parser
手动安装,同样。
我很困惑,请给我一些有用的建议!
以下是可能需要的信息:
OS: Win 7
npm version: 6.14.6
Node.js version: v12.18.4
解决方案
我也遇到了这个问题,我使用“-m yarn”选项成功创建了项目。
vue create your-project -m yarn
推荐阅读
- sql-server - 如何使用 SQL 服务器汇总汇总|SQL CUBE
- r - Plotting two subgroups of several groups against one another, when in long format
- python - Python - OTRS REST/SOAP API - python-otrs
- discord.py - 将 Adf.ly 与 Discord.py 一起使用
- java - 在组合关系中查找特定的调用者
- javascript - GETJson 将两个参数传递给服务器
- android - 以编程方式将视图添加到 ConstraintLayout
- python - 我该如何从 Twilio 中的特定房间获取数据?
- django - Nginx: 403 禁止 nginx/1.12.1 (Ubuntu)
- office-js - Office.js 在现有加载项中导入自定义函数