Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
qyvip opened this issue Aug 19, 2019 · 18 comments

Comments

@qyvip
Copy link

qyvip commented Aug 19, 2019

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

@Amiedon
Copy link

Amiedon commented Aug 19, 2019

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

@tuhe32
Copy link

tuhe32 commented Aug 19, 2019

I also encountered this problem, how to solve it?

@alanwhy
Copy link

alanwhy commented Aug 19, 2019

如何解决这个问题呢?

@iamobj
Copy link

iamobj commented Aug 19, 2019

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

@bullBeer
Copy link

我也遇到这个问题~

@383366204
Copy link

how to fix it ?

@BG7ZAG
Copy link

BG7ZAG commented Aug 19, 2019

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

@383366204
Copy link

是新版本的portfinder有bug,安装旧版的就可以了
npm install portfinder@1.0.21

@BG7ZAG
Copy link

BG7ZAG commented Aug 19, 2019

@383366204 好像也不行

@ArcherGu
Copy link

@383366204 好像也不行

npm install portfinder@1.0.21,再正常[c]npm i

@kinoshitaringo
Copy link

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

@feixiang-aa
Copy link

是新版本的portfinder有bug,安装旧版的就可以了
npm install portfinder@1.0.21

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

@383366204
Copy link

是新版本的portfinder有bug,安装旧版的就可以了
npm install portfinder@1.0.21

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

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

@reducm
Copy link

reducm commented Aug 19, 2019

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

@purestart
Copy link

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

@GZWZC
Copy link

GZWZC commented Aug 19, 2019

@383366204 好像也不行

npm install portfinder@1.0.21,再正常[c]npm i

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

@whq920729
Copy link

@383366204 好像也不行

npm install portfinder@1.0.21,再正常[c]npm i

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

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

@haoqunjiang
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests