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

相关推荐
Vicky&James1 分钟前
WPF到Web的无缝过渡:英雄联盟客户端项目OpenSilver迁移实战
前端·wpf
m0_748233645 分钟前
RabbitMQ 进阶
android·前端·后端
不想有bug的小菜鸟13 分钟前
vue3使用iframe全屏展示pdf效果
前端·pdf
m0_7482386314 分钟前
Spring Boot项目接收前端参数的11种方式
前端·spring boot·后端
u01005596015 分钟前
前端代理,解决跨域问题讲解
前端
quitv20 分钟前
react脚手架配置别名
前端·javascript·react.js
m0_5287238129 分钟前
前端如何进行性能优化
前端·性能优化
化作繁星30 分钟前
在 Vue 3 中,如何缓存和复用动态组件
前端·vue.js·缓存
一粒沙-1 小时前
iOS 将GIF图分享至微信
前端·ios
graywen1 小时前
从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
前端