התקנת bcrypt
-
אני צריך להתקין על המחשב הלוקלי שלי bcrypt וראיתי בהדרכה שאני צריך להתקין תלויות לפי ההנחיות כאן. אבל כשאני מנסה להתקין אני מקבל את השגיאה הזו:
C:\xampp\htdocs>npm install --global --production windows-build-tools > windows-build-tools@5.0.0 postinstall C:\Users\a\AppData\Roaming\npm\node_modules\windows-build-tools > node ./dist/index.js Downloading python-2.7.15.amd64.msi Error: unable to verify the first certificate Downloading Python failed. Error: { Error: unable to verify the first certificate at TLSSocket.<anonymous> (_tls_wrap.js:1105:38) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:639:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } windows-build-tools will now exit. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.0.0 postinstall: `node ./dist/index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.0.0 postinstall 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\a\AppData\Roaming\npm-cache\_logs\2018-09-20T16_56_00_994Z-debug.log
יש איזו בעיה בהרשאות מנהל שלי ב-cmd?
תודה.
-
אולי אני לא עושה את הצעד הנכון כיון שהשגיאה הראשונית בהתקנת הbcrypt היתה זו:
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.0 and node@8.11.3 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error unable to verify the first certificate gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR! System Windows_NT 10.0.17134 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:\\xampp\\htdocs\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\xampp\\htdocs\\dash\\dash\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi" gyp ERR! cwd C:\xampp\htdocs\dash\dash\node_modules\bcrypt gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 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:\xampp\htdocs\dash\dash\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\xampp\htdocs\dash\dash\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\xampp\htdocs\dash\dash\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xampp\\htdocs\\dash\\dash\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\xampp\htdocs\node_modules\bcrypt node-pre-gyp ERR! node -v v8.11.3 node-pre-gyp ERR! node-pre-gyp -v v0.10.2 node-pre-gyp ERR! not ok 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:\xampp\htdocs\dash\dash\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\xampp\htdocs\dash\dash\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.0 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.0 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\a\AppData\Roaming\npm-cache\_logs\2018-09-20T16_53_27_138Z-debug.log
-
התקנתי את התעודה, והרצתי את הפקודה הראשונה של התלויות והשגיאה היא:
Error: unable to verify the first certificate Downloading Python failed. Error: { Error: unable to verify the first certificate at TLSSocket.<anonymous> (_tls_wrap.js:1105:38) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:639:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } windows-build-tools will now exit. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! windows-build-tools@5.0.0 postinstall: `node ./dist/index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the windows-build-tools@5.0.0 postinstall 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\a\AppData\Roaming\npm-cache\_logs\2018-09-20T21_12_11_651Z-debug.log
-
צודק. תודה.
השאלה למה.
כי התקנתי את התעודה (בהתחלה בnpm וכיון שלא קיבלתי שום תגובה כשהרצתי את הפקודות, אז התקנתי לכל מוצרי NODE ואז קיבלתי אישור (Specified value was saved).ולמרות זאת יש את השגיאה הנ"ל. -
-
פתחתי שורת פקודה חדשה כאדמיניסטרטור והרצתי את הפקודה הנ"ל, וזה עבד.
אבל הפקודה הבאה של התקנת ה-bcrypt עדיין תקועה.השגיאה היא:
C:\xampp\htdocs>npm install bcrypt > bcrypt@3.0.1 install C:\xampp\htdocs\node_modules\bcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.1 and node@8.11.3 (node-v57 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error unable to verify the first certificate gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: unable to get local issuer certificate gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1105:38) gyp ERR! stack at emitNone (events.js:106:13) gyp ERR! stack at TLSSocket.emit (events.js:208:7) gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:639:8) gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38) gyp ERR! System Windows_NT 10.0.17134 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:\\xampp\\htdocs\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\xampp\\htdocs\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" gyp ERR! cwd C:\xampp\htdocs\node_modules\bcrypt gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 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:\xampp\htdocs\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\xampp\htdocs\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\xampp\htdocs\node_modules\bcrypt\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Windows_NT 10.0.17134 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\xampp\\htdocs\\node_modules\\bcrypt\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\xampp\htdocs\node_modules\bcrypt node-pre-gyp ERR! node -v v8.11.3 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok 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:\xampp\htdocs\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\xampp\htdocs\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.1 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.1 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\a\AppData\Roaming\npm-cache\_logs\2018-10-06T18_27_23_154Z-debug.log
(השגיאה נשארה גם לאחר שהרצתי את השורה
npm install node-pre-gyp -g
)
תודה רבה.