Vue项目每次打开的端口不同,指定端口失效
在config/index.js中指定
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
- 1
- 2
失效
原因:portfinder新发布的版本异常
解决方案:
npm install portfinder@1.0.21
- 1
</div>
<link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-e44c3c0e64.css" rel="stylesheet">
</div>
本文介绍了解决Vue项目中端口冲突的问题,通常在config/index.js中指定的端口号可能由于portfinder新版本异常而无法生效。文章提供了一个解决方案,通过安装特定版本的portfinder来确保端口设置正确。
1180

被折叠的 条评论
为什么被折叠?



