hailey-it
hailey-IT
hailey-it
전체 방문자
오늘
어제
  • 전체보기 (29)
    • MSA (4)
    • Redis (2)
    • CS (4)
      • Nerwork (3)
      • Security (1)
    • JPA (1)
    • 대규모 스트림처리 (3)
    • Git (2)
    • Mac M1 (9)
      • Mac (4)
      • App (4)
    • Programming (4)
      • Android (2)
      • IntelliJ (1)
      • React (1)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

최근 댓글

최근 글

hailey-it

hailey-IT

Programming/React

[React] Error: Dev Server has been initialized using an options object that does not match the API schema.

2022. 12. 13. 18:27

리액트를 실행하려고 npm start를 입력했을 때

 

Dev Server has been initialized using an

options object that does not match the API schema.

오류 해결 방법

 

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
 - options.allowedHosts[0] should be a non-empty string.

 

pakage.json 파일 마지막 줄에

 

  "options": {
    "allowedHosts": ["localhost", ".localhost"],
    "proxy": "https://localhost:8080/"
  }

 

options property를 

추가해주면 

오류 없이 리액트가 잘 실행됩니다!

 

 

 

 

저작자표시 (새창열림)
    hailey-it
    hailey-it

    티스토리툴바