vue项目创建与运行(idea)

一、安装vue

在安装完node.js后

使用管理员身份运行命令行,在命令行中,执行如下指令:

npm install -g @vue/cli

这个过程中,会联网下载,可能会耗时几分钟,耐心等待。

以管理员身份运行cmd检查版本

idea创建vue项目的几种方式

1、vue -ui

管理员cmd,输入命令

vue -ui

进入项目管理器进行创建

选择文件夹,创建项目。

然后选择预设,配置完成

用idea打开项目所在的目录

用vscode打开需要执行npm -serve

2、安装idea插件

Vue.js Plugin for JetBrains IDEs | JetBrains Marketplace

找到自己安装所对应的版本

这里以2017.3为例

点击右下角,++install plugin from disk++

选择jar包,

导入后apply进行应用

重启后

权限问题解决办法

问题描述

PS D:\QCBY\vuetest> npm run serve npm WARN logfile could not be created: Error: EPERM: operation not permitted, open 'D:\nodejs\node_cache\_logs\2025-01-17T13_36_07_834Z-debug-0.log' npm WARN logfile could not be created: Error: EPERM: operation not permitted, open 'D:\nodejs\node_cache\_logs\2025-01-17T13_36_08_296Z-debug-0.log' npm ERR! code ENOENT npm ERR! syscall open npm ERR! path D:\QCBY\vuetest/package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'D:\QCBY\vuetest\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! Log files were not written due to an error writing to the directory: D:\nodejs\node_cache\_logs npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal PS D:\QCBY\vuetest>

打开node.js所在文件夹

修改nodecache和nodegloble的属性

右键属性--》安全

编辑users的权限都勾选上(除了最后一个)

相关推荐
小张会进步几秒前
数组:二维数组
java·javascript·算法
光影少年4 分钟前
如何进行前端性能优化?
前端·性能优化
Dxy123931021611 分钟前
js如何把字符串转数字
开发语言·前端·javascript
爱写bug的野原新之助19 分钟前
爬虫之补环境:加载原型链
前端·javascript·爬虫
陈广亮27 分钟前
工具指南7-Unix时间戳转换工具
前端
NGBQ1213834 分钟前
Adobe-Premiere-Pro-2026-26.0.2.2-m0nkrus 全解析:专业视频编辑软件深度指南
前端·adobe·音视频
北城笑笑35 分钟前
Chrome:Paused in debugger 的踩坑实录:问题排查全过程与终极解决方案( 在调试器中暂停 )
前端·chrome
haorooms37 分钟前
Promise.try () 完全指南
前端·javascript
kyriewen38 分钟前
闭包:那个“赖着不走”的家伙,到底有什么用?
前端·javascript·ecmascript 6
斌味代码41 分钟前
el-popover跳转页面不隐藏,el-popover销毁
前端·javascript·vue.js