-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
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가 제대로 생성이 안됩니다.. 왜 그런건지 궁금해서 질문합니다.
답변을 작성해보세요.
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" %*
답변 2