前端vue
星 ~ 程 @
这个作者很懒,什么都没留下…
展开
-
npm install报错:ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1
[踩坑]npm ERR! gyp info it worked if it ends with oknpm ERR! gyp verb cli原创 2024-07-26 10:20:17 · 668 阅读 · 0 评论 -
vue不是内部或外部命令,也不是可运行的程序 或批处理文件。
全局安装Vue-cli之后,在命令行工具中输入命令执行vue --version,提示:不是内部或外部命令,也不是可运行的程序或批处理文件。原因:环境变量没有配置。解决方式:在命令行工具中执行npm config list,回车。打开图中划线的路径,看这个文件夹下是否有vue.cmd这个文件。如果有vue.cmd,则复制这个路径(上图划圈),添加到系统环境变量中。这样就解决了~(ps: 如果没有vue.cmd,则说明你可能没安装成功,需要重新安装vue-cli)...原创 2022-01-07 14:55:12 · 24519 阅读 · 10 评论 -
解决vue-router报NavigationDuplicated: Avoided redundant navigation to current location 的问题
最近写项目的时候, 重复点击路由会在控制台报这样的错误。记录一下这个错误是 vue-router更新以后新出现的错误。(我使用的是vue-router 3.2.0)出现的 但是 (vue-router 3.0.6) 没有出现。 但是也不排除是我的 3.0.6之前做过配置。它的提示是 避免到当前位置的冗余导航。 简单来说就是重复触发了同一个路由。const originalPush = VueRouter.prototype.pushVueRouter.prototype.pu...原创 2021-12-20 15:30:04 · 462 阅读 · 0 评论 -
vue-router TypeError: Cannot read property ‘$createElement‘ of undefined
vue-router TypeError: Cannot read property ‘$createElement‘ of undefined路由不跳转,还报错,router 文件夹下的 index.js 代码如下:错误的原因是把 component 写成了 componentsimport Vue from 'vue'import VueRouter from 'vue-router'import Content from '../components/Content'import Ma原创 2021-10-27 10:24:17 · 411 阅读 · 0 评论