serve -s build가 되지 않습니다..
983
작성한 질문수 4
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\PC\Desktop\emotion diary> npm install -g serve
changed 89 packages, and audited 90 packages in 10s
23 packages are looking for funding
run npm fund for details
PS C:\Users\PC\Desktop\emotion diary> cd hello
PS C:\Users\PC\Desktop\emotion diary\hello> serve -g build
serve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\ser
ve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.mic
rosoft.com/fwlink/?LinkID=135170)를 참조하십시오.
위치 줄:1 문자:1
+ serve -g build
+ ~~~~~
+ CategoryInfo : 보안 오류: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\PC\Desktop\emotion diary\hello> npm run build
> hello@0.1.0 build
> react-scripts build
Creating an optimized production build...
Compiled with warnings.
[eslint]
src\components\DiaryItem.js
Line 32:16: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
src\components\DiaryList.js
Line 1:15: 'useEffect' is defined but never used no-unused-vars
src\components\EmotionItem.js
Line 6:13: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
src\pages\Diary.js
Line 20:7: React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array react-hooks/exhaustive-deps
Line 37:7: React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array react-hooks/exhaustive-deps
Line 58:25: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text
src\pages\Edit.js
Line 5:9: 'getStringDate' is defined but never used
no-unused-vars
Line 22:7: React Hook useEffect has a missing dependency: 'id'. Either include it or
remove the dependency array react-hooks/exhaustive-deps
Line 39:7: React Hook useEffect has a missing dependency: 'navigate'. Either include
it or remove the dependency array react-hooks/exhaustive-deps
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
54.79 kB build\static\js\main.544a876e.js
1.42 kB build\static\css\main.b7fc6af2.css
The project was built assuming it is hosted at /.
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:
PS C:\Users\PC\Desktop\emotion diary\hello> serve -s build
serve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\ser
ve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.mic
rosoft.com/fwlink/?LinkID=135170)를 참조하십시오.
위치 줄:1 문자:1
+ serve -s build
+ ~~~~~
+ CategoryInfo : 보안 오류: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\PC\Desktop\emotion diary\hello>
npm install -g serve와
npm run build를 했습니다
you may serve it with a static server라는 메시지와함께
serve -s build라는 메세지도 떴는데
serve -s build라고 명령어를 입력했는데도 입력이 되지 않습니다... 루트폴더 문제인가요? 문제가 무엇인가요
답변 3
3
vscode를 관리자 권한으로 실행해도 안되시는 분들은 vscode 터미널에 ExecutionPolicy명령어를 입력했을 때 Restricted와 같이 나오면
Set-ExecutionPolicy Unrestriced 입력 후 serve -s build 진행해보시기 바랍니다.
저는 위와 같이 진행해서 해결했습니다
3
맥쓰시는 분들도 혹시나 보실까봐 댓글 남깁니다!
https://blog.sonim1.com/125
npm install -g serve 안되시는 분들은 위에 링크 참고 하시면 됩니다! 저는 아래와 같이 작성해서 install 되었습니다!
sudo npm install -g serve 이렇게 하니깐 되었습니다!!
1
안녕하세요 이정환입니다.
권한 관련 오류가 발생한 것 같습니다.
vscode를 관리자 권한으로 실행하신 다음 동일하게 실행 해 보시면 실행될 것으로 예상됩니다.
그래도 안 될 경우 명령 프롬프트를 관리자 권한으로 실행하여 실행해 보시기 바랍니다.
혹시 관리자 권한으로 실행하는 방법을 모르실 수 있으니 아래 링크로도 첨부 해 드릴게요!
useEffect와 lifecycle문의
0
3
1
프론트엔드 학습 수준 문의
0
23
2
리액트 챕터별 코드에서 eslint 설정파일이 없어요
0
41
2
데이터 로딩중 화면만 계속 나와요!!
0
51
2
퍼블리셔일경우 어느정도 수준까지 강의를 들어야할까요
0
75
2
이후의 커리큘럼 문의
0
101
2
실슬환경 설정에서 save후 console.log 부분이 새로고침이 안되는현상입니다.
0
49
2
최적화 관련 질문있습니다 (useMemo 등)
0
82
3
프로바이더 컴포넌트의 위치는 어떤 기준인가요?
1
79
3
Date 객체에 관련하여 질문드립니다.
0
82
2
리액트 개정판 교재 질문
0
58
2
예제코드가 안나와요!
0
75
2
select a variant 선택에서 javascript와 javascript+react compiler 중 무엇을 선택해야하나요? com
0
104
2
onMouseEnter 관련 문의 드립니다
0
89
3
배열의 렌더링 관련 질문 드립니다.
0
70
2
2:40초 refObj를 콘솔로 출력시 오류가 발생합니다.
0
111
2
TS, 리액트 강의중에 뭘 먼저 수강하는게 좋을까요?
0
131
2
useCallback 적용한 onCreate, onUpdate, onDelete 함수..
0
66
1
vs code 자동완성관련 문의
0
106
2
91강 useEffect내에서 상태변화함수 호출시 발생하는 에러
1
173
2
87강 필터 함수 질문
0
65
2
useRef, useState count 비교
0
64
2
안된다고했던 이유가 무엇이었는지 모르겠습니다
0
86
2
85강에서 객체를 왜 클래스로 만들어서 new 하지 않는건지 궁금합니다.
0
73
2





