Cara Install Bcrypt yang error di Node.js
Terkadang package node.js ada yang membutuhkan beberapa tambahan tools untuk dapat diinstall. Biasanya windows build tools untuk phyton.
Contohnya ketika install bcrypt kemudian muncul error sebagai berikut :
Contohnya ketika install bcrypt kemudian muncul error sebagai berikut :
D:\handita\Freelance Project\AWB\htdocs>npm install bcrypt > bcrypt@0.8.7 install D:\handita\Freelance Project\AWB\htdocs\node_modules\bcry pt > node-gyp rebuild D:\handita\Freelance Project\AWB\htdocs\node_modules\bcrypt>if not defined npm_c onfig_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\ \..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT HON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\nod e_modules\node-gyp\lib\configure.js:449:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node -gyp\lib\configure.js:404:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:123:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd D:\handita\Freelance Project\AWB\htdocs\node_modules\bcrypt gyp ERR! node -v v6.9.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN winter-flower@1.0.0 No repository field. npm WARN winter-flower@1.0.0 No license field. npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the bcrypt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs bcrypt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls bcrypt npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! D:\handita\Freelance Project\AWB\htdocs\npm-debug.log
node.js perlu install build tools juga caranya
npm install --global --production windows-build-tools
npm install --global node-gyp
npm config set msvs_version 2013 --global