inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

한 입 크기로 잘라먹는 타입스크립트(TypeScript)

타입스크립트 리액트 시작하기

섹션 11 에 첫번째 강의부터 오류가 납니다 리액트 설치

1776

Ch.3

작성한 질문수 1

0

section11 내에 npx create-react-app .

 

터미널에 명령어 치면 오류가 납니다...ㅠ

 

무슨 문제일까요?

 

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

npm ERR! /Users/hwji/.npm/_logs/2023-05-29T10_29_18_773Z-debug-0.log

hwji@ji-MacBook-Air section11 % npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-templa

hwji@ji-MacBook-Air section11 % npm i

npm ERR! code ENOENT

npm ERR! syscall open

npm ERR! path /Users/hwji/Downloads/onebite-typescript/section11/package.json

npm ERR! errno -2

npm ERR! enoent ENOENT: no such file or directory, open '/Users/hwji/Downloads/onebite-typescript/section11/package.json'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

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

npm ERR! /Users/hwji/.npm/_logs/2023-05-29T10_29_43_763Z-debug-0.log

hwji@ji-MacBook-Air section11 % npx create-react-app .

The directory . contains files that could conflict:

package-lock.json

Either try using a new directory name, or remove the files listed above.

hwji@ji-MacBook-Air section11 % rm package-lock.json

hwji@ji-MacBook-Air section11 % npx create-react-app .

Creating a new React app in /Users/hwji/Downloads/onebite-typescript/section11.

Installing packages. This might take a couple of minutes.

Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code EACCES

npm ERR! syscall link

npm ERR! path /Users/hwji/.npm/_cacache/tmp/ad0df713

npm ERR! dest /Users/hwji/.npm/_cacache/content-v2/sha512/22/eb/ce31d78e398d97e2144d013ea4c1b78fb4adb5054cab00480b2af88bf292fa00411551572ab5174dfc725704b1886edf53dc44e65d19c579d45199035363

npm ERR! errno -13

npm ERR!

npm ERR! Your cache folder contains root-owned files, due to a bug in

npm ERR! previous versions of npm which has since been addressed.

npm ERR!

npm ERR! To permanently fix this problem, please run:

npm ERR! sudo chown -R 501:20 "/Users/hwji/.npm"

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

npm ERR! /Users/hwji/.npm/_logs/2023-05-29T10_30_33_772Z-debug-0.log

Aborting installation.

npm install --no-audit --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json

Done.

hwji@ji-MacBook-Air section11 %

typescript

답변 2

0

이정환 Winterlood

해당 명령어로 설치가 되지 않으신다면

section11 폴더를 삭제하신 다음

그 상위 폴더에서 sudo npx create-react-app section11 를 이용하시면 됩니다.

0

Ch.3

네넵 알려주셔서감사합니다ㅠㅠㅠ

vscode 에러를 계쏙 chat gpt로 검색해서 해결했었습니다..! 리액트에 이어 타입스크립트도 완강 직전입니다. 좋은 강의 감사합니다!!

0

이정환 Winterlood

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

해당 오류는 터미널의 경로가 잘못되었거나

혹은 잘못된 환경 변수 선언이 이루어졌을 경우에 발생합니다.

혹시 가능하시면 에러가 발생한 터미널을 스크린샷으로 올려주시면 감사하겠습니다.

제네릭 클래스 핸드북 페이지가 undefined라고 나옵니다.

0

21

2

적절한 타입 찾기 React.ChangeEvent<HTMLInputElemen>

0

34

2

outDir 옵션 추가 후 컴파일 오류 질문

0

71

1

호출 시그니처 질문

0

69

2

서로소 유니언 타입이 discriminated union과 동의어 인가요?

0

80

2

조건부타입소개 중 함수오버로딩 활용 시 인수의타입과 함수의 반환값의 타입이 깨지는 문제

0

72

1

할인쿠폰 관련하여

0

164

2

프론트엔드에서의 인터페이스활용

0

97

2

안녕하세요 이정환님!

0

95

1

Node.js 설치에 관한 질문입니다.

0

81

2

함수 타입 호출 시그니처

0

61

1

35강. 모듈 보강은 라이브러리 파일을 직접 편집해야 하나요?

0

68

2

인터페이스 문법이 있는데 타입 별칭 문법은 왜 있나요?

0

121

4

마우스 호버 시 정보

0

94

2

vite으로 리액트 빌드하기를 업데이트해주세요.

1

91

2

타입가드를 만들어 사용하는 이유가 궁금합니다.

0

86

2

섹션 12가 너무 어려운데... 정상이겠죠..?

0

140

2

선생님.. 알고리즘도 강의해주시면안되나요

0

104

2

선생님은 어떻게 이런걸 아세요?

0

134

1

type: module

0

100

2

7:17초 업캐스팅 질문이있습니다!

0

80

1

슈퍼타입질문

1

67

2

프로젝트 설치

0

108

2

enum은 비원시 타입이면서 열거형 타입이 되는건가요?

0

73

2