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的权限都勾选上(除了最后一个)

相关推荐
二哈喇子!1 天前
BOM模型
开发语言·前端·javascript·bom
二哈喇子!1 天前
Vue2 监听器 watcher
前端·javascript·vue.js
yanyu-yaya1 天前
前端面试题
前端·面试·前端框架
二哈喇子!1 天前
使用NVM下载Node.js管理多版本
前端·npm·node.js
GGGG寄了1 天前
HTML——文本标签
开发语言·前端·html
摘星编程1 天前
在OpenHarmony上用React Native:ActionSheet确认删除
javascript·react native·react.js
2501_944521591 天前
Flutter for OpenHarmony 微动漫App实战:推荐动漫实现
android·开发语言·前端·javascript·flutter·ecmascript
Amumu121381 天前
Vue核心(三)
前端·javascript·vue.js
CoCo的编程之路1 天前
2026 前端效能革命:如何利用智能助手实现“光速”页面构建?深度横评
前端·人工智能·ai编程·comate·智能编程助手·文心快码baiducomate
RFCEO1 天前
HTML编程 课程五、:HTML5 新增语义化标签
前端·html·html5·跨平台·语义化标签·可生成安卓/ios·html最新版本