Skip to content

记:Mac proxy和vue ui相关服务启动包错踩坑记录 #13

@ithack

Description

@ithack

之前的项目mac都是用proxy代理到本地mock文件的,由于接口出来后就一只没用,今天在尝试非proxy的mock数据时,发现我的proxy不生效了,怎么访问都报错如下:
image
我用同事的mac也测了一下/回滚到了框架init版本还是不行,我以为是插件问题,所以升级重装了一下,发现还不行,这时我想用vue ui再创建一个初始化项目试试,发现一样报错:
image
这好像是端口占用啊,我就试着杀掉所有占用端口,没啥效果,然后发现并不是框架问题是自己的hosts问题谨记mac的host不可关掉如下配置:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost 
255.255.255.255	broadcasthost
::1             localhost

如上配置必备

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions