• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

next create-next-app@latest 설치 문제

24.07.01 18:31 작성 조회수 36

0

Aborting installation.

Unexpected error. Please report it as a bug:

 Error: EACCES: permission denied, open '/Users/jeonginn/Library/Preferences/create-next-app-nodejs/config.json.tmp-982595282012e022'

    at openSync (node:fs:581:18)

    at attempt (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:43165)

    at Object.writeFileSync (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:38664)

    at Conf._write (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:74912)

    at set store [as store] (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:73358)

    at Conf.set (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:71962)

    at run (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:74:51291)

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

  errno: -13,

  code: 'EACCES',

  syscall: 'open',

  path: '/Users/jeonginn/Library/Preferences/create-next-app-nodejs/config.json.tmp-982595282012e022'

}

설치할 때 터미널에서 이런 메세지가 나오네요 ㅠㅠ 권한 문제인거 같아서 구글링 계속 해보면서 해봤는데 안되서 글 남깁니다 ㅠㅠ

 

답변 1

답변을 작성해보세요.

0

인프런 AI 인턴님의 프로필

인프런 AI 인턴

2024.07.03

안녕하세요, 인프런 AI 인턴입니다.

EACCES: permission denied 오류는 파일이나 디렉토리에 접근할 권한이 없을 때 발생합니다. 이 경우, create-next-app을 실행할 때 필요한 권한이 부족한 것으로 보입니다. 명령어 앞에 sudo를 붙여서 최고 관리자 권한으로 실행해 보세요. 다음과 같이 입력하면 됩니다:

sudo npx create-next-app@latest

만약 여전히 문제가 해결되지 않는다면, 권한 문제가 발생한 디렉토리나 파일의 권한을 직접 변경해 볼 수 있습니다. 다음과 같은 명령어를 사용하여 권한을 변경할 수 있습니다:

sudo chown -R $USER /Users/jeonginn/Library/Preferences/create-next-app-nodejs

이 명령어는 create-next-app-nodejs 디렉토리와 그 하위 파일들의 소유권을 현재 사용자에게 부여합니다. 이 작업 후에 다시 create-next-app 명령어를 실행해 보세요.

채널톡 아이콘