-
글쓴이글
-
2020년 11월 12일 13:21 #4779
kylee참가자sass설치 시 Error: Node Sass version 5.0.0 is incompatible with ^4.0.0라는 오류가 발생해 구글링해서 삭제 후 4.14.1 버전으로 재설치하고 있습니다. 그런데 터미널에 npm install node-sass@4.14.1를 입력하면 긴 에러 문구와 함께 설치가 되지 않습니다... <br />
이유를 찾을 수가 없어서 어떻게 해야 하는지 모르겠습니다.2020년 11월 12일 18:04 #4781
codingapple키 마스터무슨 에러인지 알려주시면 됩니다
nodejs 14버전을 쓰면
npm uninstall node-sass
npm uninstall -g node-sass
이걸로 깔끔히 삭제하고
npm install node-sass@4.14.1
해보면 됩니다
nodejs 16버전 이상을 쓴다면
npm uninstall node-sass
npm uninstall -g node-sass
이걸로 깔끔히 삭제하고
1. npm install node-sass@6 혹은 yarn add node-sass@6 으로 6버전 설치해주시고
2. 프로젝트 폴더 내에 node_modules 폴더, yarn.lock, package-lock.json 보이는걸 다 삭제하시고
3. 터미널에서 yarn install 혹은 npm install로 node_modules 폴더 재설치 해주시면 잘 되는듯요
2020년 11월 15일 15:46 #4822
kylee참가자npm ERR! code 1 npm ERR! path C:\Users\anach\Documents\programming\shop\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\anach\Documents\programming\shop\node_modules\node-gyp\bin\node-gyp.js rebuild -- npm ERR! gyp verb could not find "python". checking python launcher npm ERR! gyp verb could not find "python". guessing location npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\anach\Documents\programming\shop\node_modules\node-gyp\lib\configure.js:484:19) npm ERR! gyp ERR! stack at PythonFinder. (C:\Users\anach\Documents\programming\shop\node_modules\node-gyp\lib\configure.js:509:16) npm ERR! gyp ERR! stack at callback (C:\Users\anach\Documents\programming\shop\node_modules\graceful-fs\polyfills.js:295:20) npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:183:21) npm ERR! gyp ERR! System Windows_NT 10.0.18363 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\anach\\Documents\\programming\\shop\\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\anach\Documents\programming\shop\node_modules\node-sass npm ERR! gyp ERR! node -v v15.1.0 npm ERR! gyp ERR! node-gyp -v v3.8.0 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\anach\AppData\Local\npm-cache\_logs20-11-15T06_43_11_794Z-debug.log
에러 문구가 굉장히 길게 떠서 어느 부분을 알려드려야 할지 모르겠어서 일단 전부 첨부했습니다.
글로벌로 삭제하고 재시도도 해보았고, yarn 설치 후 시도도 해봤는데 여전히 같은 오류입니다...답변 미리 감사드립니다.
2020년 11월 15일 18:45 #4823
codingapple키 마스터https://hisk.io/how-to-fix-node-js-gyp-err-cant-find-python-executable-python-on-windows/
이걸 따라해보도록 합시다
2021년 7월 27일 10:25 #12168
김영휘참가자저도 윗분이랑 같은 오류가 계속 발생되네요... 그뒤로 scss 부분부터 막혀서 .. 진행ㅇ ㅣ안되네요 ㅜㅜ
강의에서 나온대로 설치는 잘 되지만 실행이 안되고 , 다시 삭제후 버전 낮춰서 설치하려하면 윗분 긴 오류처럼 뜨고 ... 미치겠습돠,.
댓글에 올려주신곳은 접속이 안되네요 ㅜ
2021년 7월 27일 14:25 #12186
김영휘참가자전부 삭제후에 14버전으로 설치하려고 하면 오류가 발생됩니다.
PS C:\Users\ncodi_PC1\Desktop\react\shop> npm install node-sass@4.14.1
npm ERR! code 1
npm ERR! path C:\Users\ncodi_PC1\Desktop\react\shop\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\ncodi_PC1\Desktop\react\shop\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\\ncodi_PC1\\Desktop\\react\\shop\\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@3.8.0
npm ERR! gyp info using node@16.5.0 | 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 check python checking for Python executable "python2" in the PATH
npm ERR! gyp verbwhich
failed Error: not found: python2
npm ERR! gyp verbwhich
failed at getNotFoundError (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:13:12)
npm ERR! gyp verbwhich
failed at F (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:68:19)
npm ERR! gyp verbwhich
failed at E (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:80:29)
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:89:16
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\index.js:42:5
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\windows.js:36:5
npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp verbwhich
failed python2 Error: not found: python2
npm ERR! gyp verbwhich
failed at getNotFoundError (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:13:12)
npm ERR! gyp verbwhich
failed at F (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:68:19)
npm ERR! gyp verbwhich
failed at E (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:80:29)
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:89:16
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\index.js:42:5
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\windows.js:36:5
npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:195:21) {
npm ERR! gyp verbwhich
failed code: 'ENOENT'
npm ERR! gyp verbwhich
failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verbwhich
failed Error: not found: python
npm ERR! gyp verbwhich
failed at getNotFoundError (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:13:12)
npm ERR! gyp verbwhich
failed at F (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:68:19)
npm ERR! gyp verbwhich
failed at E (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:80:29)
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:89:16
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\index.js:42:5
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\windows.js:36:5
npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp verbwhich
failed python Error: not found: python
npm ERR! gyp verbwhich
failed at getNotFoundError (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:13:12)
npm ERR! gyp verbwhich
failed at F (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:68:19)
npm ERR! gyp verbwhich
failed at E (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:80:29)
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\which\which.js:89:16
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\index.js:42:5
npm ERR! gyp verbwhich
failed at C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\isexe\windows.js:36:5
npm ERR! gyp verbwhich
failed at FSReqCallback.oncomplete (node:fs:195:21) {
npm ERR! gyp verbwhich
failed code: 'ENOENT'
npm ERR! gyp verbwhich
failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (C:\Users\ncodi_PC1\Desktop\react\shop\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:195:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ncodi_PC1\\Desktop\\react\\shop\\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\ncodi_PC1\Desktop\react\shop\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.5.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ncodi_PC1\AppData\Local\npm-cache\_logs\2021-07-27T05_23_17_249Z-debug.log2021년 7월 27일 14:52 #12190
codingapple키 마스터다행이군요 python 2 없다는 에러는 터미널에
npm install --global windows-build-tools
이거 입력해보고 프로젝트내에 node_modules 폴더 싹 지우고 npm install 해서 node_modules 폴더 다시 설치하면 될듯요 -
글쓴이글
- 답변은 로그인 후 가능합니다.