Vue-cli: portfinder1.0.22版本导致vue-cli-service servey启动后,服务端口变成了随机端口的问题

Created on 19 Aug 2019  ·  18Comments  ·  Source: vuejs/vue-cli

Version

3.10.0

Environment info

mac 

Steps to reproduce

What is expected?

The configuration file specifies port 8000, which should start at 8000, or 8001, or something like that

What is actually happening?

The port is random, like 37301, and it's different every time it starts


Portfinder1.0.22, temporarily limited to 1.0.21

bug upstream

Most helpful comment

portfinder 1.0.23 修复了这个问题,请删除项目里的 package-lock.json 或者 yarn.lock 然后重新安装依赖

All 18 comments

i ran into this problem ,too. This problem is caused by portfinder 1.0.22, which updated in Oct 19th.

I also encountered this problem, how to solve it?

如何解决这个问题呢?

Just now, I also met, I don’t know what to do.

我也遇到这个问题~

how to fix it ?

我的也是,随机端口,设置的无效了

是新版本的portfinder有bug,安装旧版的就可以了
npm install [email protected]

@383366204 好像也不行

@383366204 好像也不行

npm install [email protected],再正常[c]npm i

到node_modules/@vue/cli-service/package.json 修改依赖 "portfinder": "1.0.21",去掉^号,选择版本为1.0.21,然后在该目录下install。

是新版本的portfinder有bug,安装旧版的就可以了
npm install [email protected]

npm install [email protected]之后,当前文件夹是8080端口了,但是重新创建脚手架文件夹 还是随机端口,请问该怎么办?

是新版本的portfinder有bug,安装旧版的就可以了
npm install [email protected]

npm install [email protected]之后,当前文件夹是8080端口了,但是重新创建脚手架文件夹 还是随机端口,请问该怎么办?

可能还是引用了新版的portfinder吧

+1 端口变化导致websocket请求的地址端口一直出错

npm install [email protected]自己本地 可以解决但是别人拉了代码install后还是有问题,坐等官方解决

@383366204 好像也不行

npm install [email protected],再正常[c]npm i

刚clone vue-element-admin,devServer配好了port,但是也是随机端口。
这种方法可以解决

@383366204 好像也不行

npm install [email protected],再正常[c]npm i

刚clone vue-element-admin,devServer配好了port,但是也是随机端口。
这种方法可以解决

确定可以?我这不行啊,依然还是有两个版本的portfinder

portfinder 1.0.23 修复了这个问题,请删除项目里的 package-lock.json 或者 yarn.lock 然后重新安装依赖

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OmgImAlexis picture OmgImAlexis  ·  3Comments

CodeApePro picture CodeApePro  ·  3Comments

chasegiunta picture chasegiunta  ·  3Comments

Gonzalo2683 picture Gonzalo2683  ·  3Comments

DrSensor picture DrSensor  ·  3Comments