gpt4 book ai didi

javascript - 如何更改 react js中的默认端口

转载 作者:行者123 更新时间:2023-12-05 08:13:33 25 4
gpt4 key购买 nike

<分区>

我可以使用默认端口 3000 启动 React js。但是,当我将端口自定义为 4200 时,"start": "PORT=4200 react-scripts start"(刚刚在package.json),我无法启动 React js 应用程序。

'PORT' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todo-app@0.1.0 start: `PORT=4200 react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todo-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional lo
ging output above.

npm ERR! A complete log of this run can be found in:

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com