ํด๊ฒฐ๋ฐฉ๋ฒ๋ง ๋ณด๋ ค๋ฉด (3) ์ ์ฐธ๊ณ ํ์ธ์
(1) npm i bcrypt ์ค๋ฅ
> npm i bcrypt
๋ฅผ ์คํํ๋ฉด ์๋์ ๊ฐ์ ์ค๋ฅ๊ฐ ์์์ ธ ๋ด๋ ธ๋ค. ๋ช ๋ นํ๋กฌํํธ ๊ด๋ฆฌ์๋ชจ๋๋ก ์คํํด๋ ๋ง์ฐฌ๊ฐ์ง.
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.6/bcrypt_lib-v3.0.6-node-v72-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@12.2.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
(2) ํด๊ฒฐ๊ณผ์
1. npm install --global --production windows-build-tools
๋ฏธ์น๋ฏ์ด ๊ตฌ๊ธ๋ง์ ํ์ฌ ์ฐพ์๋ธ ๋ธ๋ก๊ทธ์์ ํด๋ต์ ์ป์ ์ ์์๋ค. (๋งฅ์ด๋ ๋ฆฌ๋ ์ค ํ๊ฒฝ์ ์๋ ๋งํฌ๋ฅผ ์ฐธ์กฐํ์ธ์.)
https://jongwony.tistory.com/16
bcrypt ์ค์น์ ์ค๋ฅ ํด๊ฒฐ
Designed by Freepik node-pre-gyp ERR! ๋ฌธ์ npm์ผ๋ก bcrypt ์ค์น์ ์๋์ ๊ฐ์ ์๋ฌ๊ฐ ์ถ๋ ฅ๋ฉ๋๋ค. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 $ npm install -s bcrypt > bcrypt@3.0.3 in..
jongwony.tistory.com
์๋์ฐ์ ๊ฒฝ์ฐ ์๋ ๋ช ๋ น์ด๋ฅผ ๋ช ๋ นํ๋กฌํํธ ๊ด๋ฆฌ์๋ชจ๋์์ ์คํํ๋ฉด ํ์ด์ฌ๋ฑ ํ์ํ ๋๊ตฌ๋ฅผ ์ค์นํด์ค๋ค.
npm install --global --production windows-build-tools
์ค๊ฐ์ ์ํฐ๋ฅผ ๋๋ฅด๊ณ ๊ณ์ํด์ ๊ธฐ๋ค๋ฆฌ๋ฉด ์๋์ ๊ฐ์ ๊ธ์ด ๋ํ๋ฌ๋ค.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
---------- Visual Studio Build Tools ----------
2019-05-28T23:32:51 : Verbose : [InstalledProductsProviderImpl]: Stream was closed
2019-05-28T23:32:51 : Verbose : [InstallerImpl]: Rpc connection was closed.
2019-05-28T23:32:51 : Verbose : [InstallerImpl]: Stream was closed
2019-05-28T23:32:52 : Verbose : Completed notifying all clients that the update is starting
2019-05-28T23:32:52 : Verbose : Updating installer [bootstrapperArguments: /finalizeInstall install --in C:\ProgramData\Microsoft\VisualStudio\Packages\_bootstrapper\vs_setup_bootstrapper_201905282332298540.json --norestart --quiet --includeRecommended --add Microsoft.VisualStudio.Workload.VCTools --locale ko-KR --activityId b92d1533-9c99-42f4-91bd-32c3d62bf49c]
------------------- Python --------------------
Successfully installed Python 2.7
๋ช ๋ นํ๋กฌํํธ๊ฐ ๊ทธ๋๋ก ๋ฉ์ถฐ์ ๋ค์ ์คํํ๊ณ bcrypt๋ฅผ ์ค์นํด ๋ดค๋ค.
> npm i bcrypt
๋ ์ค๋ฅ๋จ;;
๋ค์ ๋ช ๋ นํ๋กฌํํธ๋ฅผ ๊ด๋ฆฌ์๊ถํ์ผ๋ก ์คํํ๊ณ
npm install --global --production windows-build-tools
๋ฅผ ๋ค์ํ๋ค.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Action ended 23:54:59: CostInitialize. Return value 1.
Action start 23:54:59: FileCost.
Action ended 23:54:59: FileCost. Return value 1.
Action start 23:54:59: IsolateComponents.
Action ended 23:54:59: IsolateComponents. Return value 1.
Now configuring the Visual Studio Build Tools and Python...
All done!
+ windows-build-tools@5.1.0
added 145 packages from 99 contributors in 22.871s
์๊น์ ๋ฌ๋ฆฌ ์ ๋๋ก ๋๋ฌ์์ ์ ์ ์๋ค.
๋ค์ npm i bcrypt ๋ฅผ ํด๋ดค๋ค.
์คํจ...
2. npm install bcrypt --build-from-source
๋ชจ๋์ ์ค์นํ๊ธฐ ์ํด ๋ฏธ๋ฆฌ ์์ฑ๋ ๋ฐ์ด๋๋ฆฌ๋ฅผ ๋ค์ด๋ก๋ํด์ผํ๋ค๋ ๊ฒฝ๊ณ ์ ๋๋ค.
Visual Studio๊ฐ ์ค์น๋์ด ์๋ค๋ฉด npm install [bcrypt] --build-from-source๋ ์์ ํ ์ต์ ์ธ ์๋ํด๋ณด์ญ์์ค .
NPM PROBLEM: Node-pre-gyp. Using request for node-pre-gyp https download
I am creating Angular project and using Express.js as back-end and SQLite3 for database. When I am installing sqlite3 via command npm install sqlite3 I'm getting following error in the console. How...
stackoverflow.com
์คํจ.
(3) ํด๊ฒฐ
์กฐ๋ง๊ฐ ๊ผญ ์ฑ์ฐ๊ธธ..
1. ๋ ธ๋ 10๋ฒ์ , bcrypt 3๋ฒ์ ์ ์ค์นํ๋ค.
๊ฐ์ Q&A ์ฐพ๋ค๊ฐ ๋ฐ๊ฒฌํ ๋ต๊ธ.
ํ์ง๋ง ๋ node 12.2.0 ์ด๊ณ , ์๋์ฐ์์ ๋ ธ๋ ๋ค์ด๊ทธ๋ ์ด๋ํ๋ ๋ฒ์ ์ฐพ์๋ดค์ง๋ง ์ด๋ ค์ด๊ฑฐ ๊ฐ์์ ํฌ๊ธฐ. ์ง์ ๋ค๊ฐ ๋ค์ ์ค์นํ๊ธฐ์ ์๋ชป๋ ๊น๋ด ๋ค๋ฅธ ๋ฐฉ๋ฒ์ ์ฐพ๊ธฐ ์ํ์ฌ ๊ฒ์์์.
2. bycryptjs ์ค์น
bcryptjs
Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.
www.npmjs.com
ํค์๋๋ '๋ ธ๋๋ฒ์ 12 bcrypt' ๋ก ๊ฒ์ํจ. ์๋์ ๊ธ์ ์ฐพ์๊ณ
https://codeday.me/ko/qa/20190322/125110.html
node.js – npm์ผ๋ก bcrypt๋ฅผ ์ค์นํ๋ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. - ์ฝ๋ ๋ก๊ทธ
๋ค์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ฌ ๋ด ์ปดํจํฐ์ npm์ ์ฌ์ฉํ์ฌ bcrypt์ ์ค์นํ ์ ์์ต๋๋ค. ํ์ด์ ๋น์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ณ ์์ต๋๋ค. npm์ด ์ฑ๊ณต์ ์ผ๋ก bcrypt๋ฅผ ์ค์นํ ์ ์๋๋ก ๋ฌธ์ ๋ฅผ ์ง๋จํ๊ฑฐ๋ ์์ ํ๊ธฐ์ํ ๋จ๊ณ๋ฅผ ๊ถ์ฅ ํ ์ ์์ต๋๊น? Someones-Macbook:node_modules Cody$ npm install bcrypt npm WARN package.json grunt-contrib-htmlmin@0.1.3 No README data |
codeday.me
๋ช ๋ นํ๋กฌํํธ์์ bcryptjs๋ฅผ ์ค์นํ์๋ค.
npm install --save bcryptjs
๊ฒฝ๊ณ ๊ฐ ๋จ์ง๋ง ์ค์น๋ ๋์๋ค.
node_modules ์๋์ bcryptjs ๋ผ๋ ํด๋๊ฐ ์์ฑ๋์๊ณ
์๋์์ฑ์ผ๋ก๋ bcryptjs๊ฐ ์๋ ๊ฒ์ ํ์ธํ ์ ์๋ค.
์ฌ์ฉ๋ฐฉ๋ฒ์ bcrypt์ ๊ฐ๋ค๊ณ ํ๋ bcrypt๊ฐ ๋ค์ด๊ฐ๋ ๊ณณ์ bcryptjs๋ฅผ ์ฐ๋ฉด ๋๊ฒ ๋ค.
๋!
๋๊ธ