인프런 커뮤니티 질문&답변

김홍석님의 프로필 이미지
김홍석

작성한 질문수

따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]

파이썬오류 gyp ERR! find Python

작성

·

584

0

구글링해서 제가 해결해보려고했봤습니다만....  저에게 맞지않은 npm까지 설치하고 하니까 다른 리액트프로젝트들까지 작동이 안되는 상황까지갔어서 차라리 강사님 답변을 기다리기로했습니다 

파이썬 오류가떠서 저아래있는 툴설치해도 똑같습니다ㅠㅠ

npm --add-python-to-path='true' --debug install --global windows-build-tools

아래 에러메세지

PS C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master> npm install

 

> bcrypt@3.0.8 install C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt

> node-pre-gyp install --fallback-to-build

 

node-pre-gyp WARN Using needle for node-pre-gyp https download 

node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v83-win32-x64-unknown.tar.gz 

node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) 

gyp ERR! find Python 

gyp ERR! find Python Python is not set from command line or npm configuration

gyp ERR! find Python Python is not set from environment variable PYTHON   

gyp ERR! find Python checking if "python" can be used

gyp ERR! find Python - "python" is not in PATH or produced an error       

gyp ERR! find Python checking if "python2" can be used

gyp ERR! find Python - "python2" is not in PATH or produced an error      

gyp ERR! find Python checking if "python3" can be used

gyp ERR! find Python - "python3" is not in PATH or produced an error      

gyp ERR! find Python checking if the py launcher can be used to find Python 2

gyp ERR! find Python - "py.exe" is not in PATH or produced an error       

gyp ERR! find Python checking if Python is C:\Python27\python.exe

gyp ERR! find Python - "C:\Python27\python.exe" could not be run

gyp ERR! find Python checking if Python is C:\Python37\python.exe

gyp ERR! find Python - "C:\Python37\python.exe" could not be run

gyp ERR! find Python 

gyp ERR! find Python **********************************************************

gyp ERR! find Python You need to install the latest version of Python.    

gyp ERR! find Python Node-gyp should be able to find and use Python. If not,

gyp ERR! find Python you can try one of the following options:

gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"    

gyp ERR! find Python   (accepted by both node-gyp and npm)

gyp ERR! find Python - Set the environment variable PYTHON

gyp ERR! find Python - Set the npm configuration variable python:

gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"      

gyp ERR! find Python For more information consult the documentation at:   

gyp ERR! find Python https://github.com/nodejs/node-gyp#installation      

gyp ERR! find Python **********************************************************

gyp ERR! find Python 

gyp ERR! configure error

gyp ERR! stack Error: Could not find any Python installation to use       

gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)

gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)

gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)

gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)      

gyp ERR! stack     at exithandler (child_process.js:315:5)

gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:327:5)  

gyp ERR! stack     at ChildProcess.emit (events.js:315:20)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

gyp ERR! stack     at onErrorNT (internal/child_process.js:465:16)        

gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)

gyp ERR! System Windows_NT 10.0.19041

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"

gyp ERR! cwd C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt

gyp ERR! node -v v14.16.0

gyp ERR! node-gyp -v v5.1.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)

node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)

node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)

node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

node-pre-gyp ERR! System Windows_NT 10.0.19041

node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"          ack-master\node_modules\bcrypt

node-pre-gyp ERR! cwd C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\bcrypt

node-pre-gyp ERR! node -v v14.16.0

node-pre-gyp ERR! node-pre-gyp -v v0.14.0                                 s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\User

node-pre-gyp ERR! not ok                                                  t\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\b

Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejn=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallb| ^16.0.0-0 but none is installed. You must install peer dependencies yourself.ack-to-build --module=C:\Users\KHS\Desktop\React class\boilerplate-mern-st.0.0-0 but none is installed. You must install peer dependencies yourself.npm WARN react-boiler-plate@1ack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\KHS\Desktop\React class\boilerplate-mern-les\fsevents):stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_nvents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})api=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.

npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.npm WARN react-boiler-plate@1.0.0 No repository field.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modual logging output above.les\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32",_11_535Z-debug.log"arch":"x64"})

 

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build` 

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the bcrypt@3.0.8 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 

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

npm ERR!     C:\Users\KHS\AppData\Roaming\npm-cache\_logs\2021-02-27T21_22_11_535Z-debug.log

답변 3

0

해결하셨나요 저도 같은 에러라 댓글남겨요ㅠㅠ

0

John Ahn님의 프로필 이미지
John Ahn
지식공유자

안녕하세요  

김홍석님   아마 bcrypt 오류 일수도 있는데 

npm install bcryptjs --save  명령어로   bcrypt를 대체할 수 있는 bcryptjs 를 설치 합니다. 

그리고  const bcrypt = require('bcrypt); 이렇게 된 부분을 

const bcrypt = require('bcryptjs'); 이렇게 바꿔주세요 ~ 

김홍석님의 프로필 이미지
김홍석
질문자

인스톨하고 npm run start 했을때 에러는안뜨는데 작동을안하네요 ㅠㅠㅠ

PS C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master> npm install bcryptjs --save

npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.

npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself.

npm WARN react-boiler-plate@1.0.0 No repository field.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ bcryptjs@2.4.3

updated 1 package and audited 481 packages in 3.457s

4 packages are looking for funding

  run `npm fund` for details      

found 8 vulnerabilities (6 low, 2 high)

  run `npm audit fix` to fix them, or `npm audit` for details

PS C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master> npm run start

> react-boiler-plate@1.0.0 start C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master

> node server/index.js

(node:14632) Warning: Accessing non-existent property 'count' of module exports inside circular dependency

(Use `node --trace-warnings ...` to show where the warning was created)

(node:14632) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency

(node:14632) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency

(node:14632) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

Server Listening on 5000

MongooseError [MongooseServerSelectionError]: connection <monitor> to 54.205.203.181:27017 closed

    at new MongooseServerSelectionError (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\mongoose\lib\error\serverSelection.js:22:11)

    at NativeConnection.Connection.openUri (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\mongoose\lib\connection.js:823:32)

    at Mongoose.connect (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\node_modules\mongoose\lib\index.js:333:15)

    at Object.<anonymous> (C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\server\index.js:18:26)

    at Module._compile (internal/modules/cjs/loader.js:1063:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

    at Module.load (internal/modules/cjs/loader.js:928:32)

    at Function.Module._load (internal/modules/cjs/loader.js:769:14)

:72:12)

    at internal/main/run_main_module.js:17:47 {

  reason: TopologyDescription {

    type: 'ReplicaSetNoPrimary',

    setName: null,

    maxSetVersion: null,

    maxElectionId: null,

    servers: Map(3) {

      'travel-shard-00-01.myzzm.mongodb.net:27017' => [ServerDescription],

      'travel-shard-00-02.myzzm.mongodb.net:27017' => [ServerDescription],

      'travel-shard-00-00.myzzm.mongodb.net:27017' => [ServerDescription]

    },

    stale: false,

    compatible: true,

    compatibilityError: null,

    logicalSessionTimeoutMinutes: null,

    heartbeatFrequencyMS: 10000,

    localThresholdMS: 15,

    commonWireVersion: null

  },

  [Symbol(mongoErrorContextSymbol)]: {}

}

John Ahn님의 프로필 이미지
John Ahn
지식공유자

몽고 디비 에러인것 같은데 혹시 실행하시는걸 스타벅스 같은 장소에서 실행하고 계시나요 ? 
그럴 때 안되는 경우가 있더라구요 ...   현재는 디비 접속 에러인것 같습니다 ~ 

0

김홍석님의 프로필 이미지
김홍석
질문자

이건 npm run start했을때 에러입니다

Require stack:

- C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\server\coate-mern-stack-masternfig\key.js

- C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master\server\index.js

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)

    at Function.Module._load (internal/modules/cjs/loader.js:725:27)      

    at Module.require (internal/modules/cjs/loader.js:952:19)

    at require (internal/modules/cjs/helpers.js:88:18)

    at Object.<anonymous> (C:\Users\KHS\Desktop\React class\boilerplate-menfig\key.jsrn-stack-master\server\config\key.js:4:22)                                dex.js     

    at Module._compile (internal/modules/cjs/loader.js:1063:30)           0:15)      

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

    at Module.load (internal/modules/cjs/loader.js:928:32)

    at Function.Module._load (internal/modules/cjs/loader.js:769:14)      rn-stack-master\server\config\key.js:4:22)

    at Module.require (internal/modules/cjs/loader.js:952:19) {

  code: 'MODULE_NOT_FOUND',                                               10)

  requireStack: [

    'C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\server\\config\\key.js',

    'C:\\Users\\KHS\\Desktop\\React class\\boilerplate-mern-stack-master\\server\\index.js'

  ]                                                                       server\\config\\key.js',

}                                                                         server\\index.js'

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! react-boiler-plate@1.0.0 start: `node server/index.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the react-boiler-plate@1.0.0 start script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

                                                                          al logging output above.

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

npm ERR!     C:\Users\KHS\AppData\Roaming\npm-cache\_logs\2021-02-27T21_35_44_636Z-debug.log

PS C:\Users\KHS\Desktop\React class\boilerplate-mern-stack-master>

김홍석님의 프로필 이미지
김홍석

작성한 질문수

질문하기