본문 바로가기

개발 이야기/플러터 개발

플러터 웹 - 에러 해결 방법

728x90

플러터 웹으로 개발한 프로젝트를

 

flutter run -d chrome

 

위와 같은 명령으로 웹브라우저 크롬으로 실행하려고 하는데,

다음과 같은 에러가 발생한다...

 

Failed to bind web development server:
SocketException: Failed to create server socket (OS Error: Failed to start accept),
address = localhost, port = 10838

 

위와 같은 에러 해결을 하기 위해 구글링 하여 찾은 해결책이 아래와 같습니다.

https://stackoverflow.com/questions/61299616/failed-to-create-server-socket-when-run-flutter-web-application

 

결론은 아래와 같이 하면 해결하면 됩니다.

==>

flutter run -d chrome --web-port=8080 --web-hostname=127.0.0.1

<==

 

해보니 잘 됩니다. 참고하세요.