• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

npm install -g create-react-app 에러

22.01.15 17:48 작성 조회수 865

1

npm install -g create-react-app

npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

npm ERR! code EEXIST

npm ERR! path C:\Users\user\AppData\Roaming\npm\create-react-app.ps1

npm ERR! EEXIST: file already exists

npm ERR! File exists: C:\Users\user\AppData\Roaming\npm\create-react-app.ps1

npm ERR! Remove the existing file and try again, or run npm

npm ERR! with --force to overwrite files recklessly.

 

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

npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2022-01-15T08_35_49_232Z-debug.log

 

구글링 해서 

 

Solution —

  • Run “npm uninstall -g create-react-app
  • In various situations whereby the above does not work, run “which create-react-app” and uninstall it from there
  • Then, run the command, “npx create-react-app project

Alternatives —

  • Run “npm uninstall -g create-react-app”, then “npm cache clean --force”
  • Afterwards, try “npm cache verify” and “npx create-react-app project” or “yarn create react-app project
  • 위에 처럼 해도 nodejs가 제대로 생성이 안됩니다.. 왜 그런건지 궁금해서 질문합니다.

답변 2

·

답변을 작성해보세요.

0

에러를 읽었을 때현재 create-react-app이 이미 존재한다는 것 같습니다!

이전에 설치하셨다면 바로 다음으로 진행해도 괜찮을 것 같고,

만약 설치가 안됐다면  npm install -g create-react-app --force 요렇게 입력해보세요!

박지혜님의 프로필

박지혜

2022.04.29

w전 왜 안될까요.. 계속 오류가 뜹니다

0

가즈아님의 프로필

가즈아

질문자

2022.01.15

path 왁인해보니 이렇게 뜹니다.
 
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0

IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)

endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\node_modules\greate-react-app\index.js" %*