난 그저 scss를 사용하고 싶었을 뿐인데.........
npm install node-sass를 입력하는 순간.........
npm ERR! code 1
npm ERR! path C:\Users\wpdhk\Desktop\todo_list\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\wpdhk\Desktop\todo_list\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\wpdhk\\Desktop\\todo_list\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.12.1 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - "python" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python39\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python39\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python39-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python39-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python39-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files (x86)\Python39-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python38\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python38\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python38\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python38-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python38-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python38-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python38-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files (x86)\Python38-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python37\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python37\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python37\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python37\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python37-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python37-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python37-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python37-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files (x86)\Python37-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python36\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python36\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python36\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python36\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python36-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files\Python36-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files\Python36-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files\Python36-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
npm ERR! gyp verb find Python - executing "C:\Program Files (x86)\Python36-32\python.exe" to get version
npm ERR! gyp verb find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
npm ERR! gyp verb find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp verb find Python - executing "py.exe" to get Python 3 executable path
npm ERR! gyp verb find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\wpdhk\AppData\Local\Programs\Python\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\wpdhk\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (C:\Users\wpdhk\Desktop\todo_list\node_modules\node-gyp\lib\find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Users\wpdhk\Desktop\todo_list\node_modules\node-gyp\lib\find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\wpdhk\Desktop\todo_list\node_modules\node-gyp\lib\find-python.js:228:18)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Users\wpdhk\Desktop\todo_list\node_modules\node-gyp\lib\find-python.js:294:16)
npm ERR! gyp ERR! stack at exithandler (node:child_process:420:5)
npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:432:5)npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\wpdhk\\Desktop\\todo_list\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\wpdhk\Desktop\todo_list\node_modules\node-sass
npm ERR! gyp ERR! node -v v18.12.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\wpdhk\AppData\Local\npm-cache\_logs\2022-12-12T08_49_03_700Z-debug-0.log
이게 다 에러 메세지라면 믿으시겠습니까.......
이것저것 다 해봐도 뭐든 에러가 뜨는 상황 ㅠㅠ
일단 파이썬을 설치합니다.......
1. 파이썬 설치
https://www.python.org/downloads/
Download Python
The official home of the Python Programming Language
www.python.org
공식 사이트에서 최신 버전을 다운로드한다
설치 창 맨 아래에 Add python.exe to PATH를 체크하고 설치해준다
설치 후 다시 명령어를 입력했더니
WOW 더 긴 에러가 떴습니다!
어디로 가야 하죠 아저씨 ......................... 살려주세요....
2. yarn으로 설치
어떤 분이 yarn으로 설치해보라고 했다
yarn add node-sass
기적처럼.......... 에러 없이 설치가 됐다!!
나의 2시간 안녕 .........
npm과 yarn 차이가 궁금해서 서치 해봤더니 처리 방법에 있어서 차이가 있다고 한다!
3. npm과 yarn
① npm
NPM(Node Package Manager)은 자바스크립트 언어를 위한 패키지 관리자로, Node.js의 기본 패키지 관리자이다.
② yarn
yarn은 페이스북에서 만든 자바스크립트 패키지 매니저이다.
npm과 같은 기능 가지고 있지만 npm의 단점인 속도(performance), 안정성(stability), 보안성(security)을
보완해서 만들어졌기 때문에 npm보다 가볍다는 느낌을 받을 수 있다.
yarn은 다운받은 패키지 데이터를 캐시(cache)에 저장하여, 중복된 데이터는 다운로드하지 않고,
캐시에 저장된 파일을 활용해서 설치한다. 그리고 npm과 달리 병렬적으로 처리한다.
npm은 다른 패키지를 즉시 포함시킬 수 있는 코드를 자동으로 실행하기 때문에 안정성에 있어서 좋지 않았다.
반면 yarn은 yarn.lock이나 package.json에 있는 파일만 설치하며,
yarn.lock은 모든 디바이스에 같은 패키지를 설치할 수 있게 하기 때문에 버전의 차이로 인해 생기는 버그를 방지해줄 수 있다.
③ 둘 중 뭐가 더 좋은가?
각자 스타일에 따라 다르겠지만 대부분 npm을 먼저 사용해 보는 것을 추천한다고 한다.
아직도 npm이 가장 많은 사용자를 보유하고 있기 때문에 npm을 사용하고 필요에 따라 yarn을 쓰면서
다른 점에 대해 느껴보는 게 좋은 것 같다!
근데 이제는 init이 안된다 열심히 해결해 봐야지 ...........
'react' 카테고리의 다른 글
[react] usePreventLeave, useBeforeLeave (0) | 2022.12.13 |
---|---|
[react] react-icons 사용하기 (0) | 2022.12.13 |
[react] Debounce와 Throttle (Lodash) (0) | 2022.12.11 |
[react] useState 사용해서 input 입력값 로컬스토리지에 저장하기 (debounce) (0) | 2022.12.11 |
[react] useConfirm (0) | 2022.12.11 |