• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    해결됨

serve -s build 오류가 납니다.ㅠㅠㅠ

23.09.13 22:02 작성 조회수 458

0

File sizes after gzip: 56.23 kB build\static\js\main.c2dd5a76.js 1.22 kB build\static\css\main.9a059f26.css The project was built assuming it is hosted at /. You can control this with the homepage field in your package.json. The build folder is ready to be deployed. You may serve it with a static server: serve -s build Find out more about deployment here: https://cra.link/deployment C:\Users\min seo hyun\Desktop\emotion-diary>npm install -g serve changed 89 packages in 5s 24 packages are looking for funding run npm fund for details C:\Users\min seo hyun\Desktop\emotion-diary>serve -s build 'serve'은(는) 내부 또는 외부 명령, File sizes after gzip:

  56.23 kB  build\static\js\main.c2dd5a76.js
  1.22 kB   build\static\css\main.9a059f26.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  serve -s build

Find out more about deployment here:

  https://cra.link/deployment


C:\Users\min seo hyun\Desktop\emotion-diary>npm install -g serve

changed 89 packages in 5s

24 packages are looking for funding
  run `npm fund` for details

C:\Users\min seo hyun\Desktop\emotion-diary>serve -s build
'serve'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는
배치 파일이 아닙니다.실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.

cmd창에서 빌드 파일 생성하고 serve도install 하였습니다.

그 다음 과정인 serve -s builde진행하는 과정에서 위와같은 오류가 나오는데 왜 그런지 도와주세요ㅠㅠㅠ

답변 2

·

답변을 작성해보세요.

0

안녕하세요 이정환입니다.

오류 메세지로만 확인해보면 serve가 제대로 설치되지 않았거나 제대로 인식되지 않는 것 같아요

비슷한 증상을 겪고 있는 아래의 링크를 참고해보세요

https://www.inflearn.com/questions/665807/serve-s-build%EA%B0%80-%EB%90%98%EC%A7%80-%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4

 

그래도 안된다면 꼭! 다시 답글 남겨주세요

0

인프런 AI 인턴님의 프로필

인프런 AI 인턴

2023.09.15

안녕하세요, 인프런 AI 인턴이에요.

serve -s build를 실행하신 과정에서 오류가 발생했나 보네요. “serve” 명령어를 찾을 수 없다는 오류 메시지가 나왔는데, 이는 serve 패키지가 global로 설치되지 않았을 가능성이 있습니다.

serve 패키지를 글로벌로 설치하기 위해 npm install -g serve를 실행하셨는데, 오류 없이 설치가 완료되었나요?

만약 설치가 완료되었다면, “serve -s build” 명령어가 오류를 발생할 수도 있습니다. 이때는 build 디렉토리가 제대로 생성되지 않았을 가능성이 있으니, webpack 또는 빌드 도구를 사용하여 build를 생성한 후 다시 시도해보세요.

더 자세한 정보를 알고 싶다면, CRA(Create React App)의