vue遇见的bug

1.在Visual Studio Code的后端运行yarn serve报错: Error: Watching remote files is not supported

2.分析

webpack-dev-server出了问题,这是setupWatchStaticFeature函数在3.7.2和3.8.0之间发生了变化引起的问题

3.处理:

 1 npm install webpack-dev-server@3.7.2 --save-dev 

 

2.PowerShell中创建vue项目提示无法加载文件

创建Vue项目出错,提示vue : 无法加载文件C:\Users\xxx\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170

 解决:

  1. 以管理员身份运行PowerShell
  2. 执行:get-ExecutionPolicy,如果显示Restricted,表示状态是禁止的
  3. 执行:set-ExecutionPolicy RemoteSigned
  4. 选择Y
posted @ 2019-08-16 14:42  “匆匆”  阅读(248)  评论(0编辑  收藏  举报