kelektiv / node.bcrypt.js

bcrypt for NodeJs
MIT License
7.43k stars 510 forks source link

installing in windows 10 with node 16.14.0 #919

Closed AbdallahEssamGaber closed 1 year ago

AbdallahEssamGaber commented 2 years ago

so i run npm i bcrypt and its giving me this `npm ERR! code 1 npm ERR! path D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\32. Authentication & Security\Secrets\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! 'Security\Secrets\node_modules.bin\' is not recognized as an internal or external command, npm ERR! operable program or batch file. npm ERR! node:internal/modules/cjs/loader:936 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! Error: Cannot find module 'D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\node-pre-gyp\bin\node-pre-gyp' npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) npm ERR! at node:internal/main/run_main_module:17:47 { npm ERR! code: 'MODULE_NOT_FOUND', npm ERR! requireStack: [] npm ERR! }

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Clay\AppData\Local\npm-cache_logs\2022-02-13T12_18_11_103Z-debug-0.log`

----------------------------------------THE LOG FILE-------------------------------------------------------------------- 0 verbose cli [ 0 verbose cli 'C:\\Users\\Clay\\.nvm\\versions\\node\\v16.14.0\\bin\\node.exe', 0 verbose cli 'C:\\Users\\Clay\\.nvm\\versions\\node\\v16.14.0\\bin\\node_modules\\npm\\bin\\npm-cli.js', 0 verbose cli 'i', 0 verbose cli 'bcrypt' 0 verbose cli ] 1 info using npm@8.3.1 2 info using node@v16.14.0 3 timing npm:load:whichnode Completed in 0ms 4 timing config:load:defaults Completed in 2ms 5 timing config:load:file:C:\Users\Clay\.nvm\versions\node\v16.14.0\bin\node_modules\npm\npmrc Completed in 1ms 6 timing config:load:builtin Completed in 2ms 7 timing config:load:cli Completed in 1ms 8 timing config:load:env Completed in 0ms 9 timing config:load:file:D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\32. Authentication & Security\Secrets\.npmrc Completed in 1ms 10 timing config:load:project Completed in 3ms 11 timing config:load:file:C:\Users\Clay\.npmrc Completed in 0ms 12 timing config:load:user Completed in 1ms 13 timing config:load:file:C:\Users\Clay\.nvm\versions\node\v16.14.0\bin\etc\npmrc Completed in 0ms 14 timing config:load:global Completed in 0ms 15 timing config:load:validate Completed in 1ms 16 timing config:load:credentials Completed in 1ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 14ms 19 timing npm:load:configload Completed in 14ms 20 timing npm:load:setTitle Completed in 0ms 21 timing config:load:flatten Completed in 2ms 22 timing npm:load:display Completed in 5ms 23 verbose logfile C:\Users\Clay\AppData\Local\npm-cache\_logs\2022-02-13T12_18_11_103Z-debug-0.log 24 timing npm:load:logFile Completed in 7ms 25 timing npm:load:timers Completed in 0ms 26 timing npm:load:configScope Completed in 0ms 27 timing npm:load Completed in 26ms 28 timing arborist:ctor Completed in 1ms 29 silly logfile start cleaning logs, removing 2 files 30 timing idealTree:init Completed in 167ms 31 timing idealTree:userRequests Completed in 2ms 32 silly idealTree buildDeps 33 silly fetch manifest bcrypt@* 34 timing arborist:ctor Completed in 0ms 35 http fetch GET 200 https://registry.npmjs.org/bcrypt 1516ms (cache revalidated) 36 silly placeDep ROOT bcrypt@5.0.1 OK for: secrets@1.0.0 want: * 37 silly fetch manifest node-addon-api@^3.1.0 38 http fetch GET 200 https://registry.npmjs.org/node-addon-api 118ms (cache revalidated) 39 timing idealTree:#root Completed in 1644ms 40 silly placeDep ROOT node-addon-api@3.2.1 OK for: bcrypt@5.0.1 want: ^3.1.0 41 timing idealTree:node_modules/bcrypt Completed in 4ms 42 timing idealTree:node_modules/node-addon-api Completed in 0ms 43 timing idealTree:buildDeps Completed in 1650ms 44 timing idealTree:fixDepFlags Completed in 3ms 45 timing idealTree Completed in 1827ms 46 timing reify:loadTrees Completed in 1828ms 47 timing reify:diffTrees Completed in 10ms 48 silly reify moves {} 49 timing reify:retireShallow Completed in 1ms 50 timing reify:createSparse Completed in 2ms 51 timing reify:loadBundles Completed in 0ms 52 silly audit bulk request { 52 silly audit '@gar/promisify': [ '1.1.2' ], 52 silly audit '@mapbox/node-pre-gyp': [ '1.0.8' ], 52 silly audit 'are-we-there-yet': [ '2.0.0', '3.0.0', '1.1.7' ], 52 silly audit gauge: [ '3.0.2', '4.0.0', '2.7.4' ], 52 silly audit npmlog: [ '5.0.1', '4.1.2', '6.0.1' ], 52 silly audit '@npmcli/fs': [ '1.1.1' ], 52 silly audit '@npmcli/move-file': [ '1.1.2' ], 52 silly audit '@tootallnate/once': [ '1.1.2' ], 52 silly audit abbrev: [ '1.1.1' ], 52 silly audit accepts: [ '1.3.8' ], 52 silly audit 'agent-base': [ '6.0.2' ], 52 silly audit agentkeepalive: [ '4.2.0' ], 52 silly audit 'aggregate-error': [ '3.1.0' ], 52 silly audit 'ansi-regex': [ '5.0.1', '2.1.1' ], 52 silly audit 'ansi-styles': [ '3.2.1' ], 52 silly audit aproba: [ '2.0.0', '1.2.0' ], 52 silly audit 'array-flatten': [ '1.1.1' ], 52 silly audit async: [ '0.9.2' ], 52 silly audit 'balanced-match': [ '1.0.2' ], 52 silly audit 'body-parser': [ '1.19.1' ], 52 silly audit debug: [ '2.6.9', '4.3.3', '3.2.7' ], 52 silly audit 'iconv-lite': [ '0.4.24', '0.6.3' ], 52 silly audit ms: [ '2.0.0', '2.1.2', '2.1.3' ], 52 silly audit 'brace-expansion': [ '1.1.11' ], 52 silly audit bytes: [ '3.1.1' ], 52 silly audit cacache: [ '15.3.0' ], 52 silly audit chalk: [ '2.4.2' ], 52 silly audit chownr: [ '2.0.0', '1.1.4' ], 52 silly audit 'clean-stack': [ '2.2.0' ], 52 silly audit 'code-point-at': [ '1.1.0' ], 52 silly audit 'color-convert': [ '1.9.3' ], 52 silly audit 'color-name': [ '1.1.3' ], 52 silly audit 'color-support': [ '1.1.3' ], 52 silly audit 'concat-map': [ '0.0.1' ], 52 silly audit 'console-control-strings': [ '1.1.0' ], 52 silly audit 'content-disposition': [ '0.5.4' ], 52 silly audit 'content-type': [ '1.0.4' ], 52 silly audit cookie: [ '0.4.1' ], 52 silly audit 'cookie-signature': [ '1.0.6' ], 52 silly audit 'core-util-is': [ '1.0.3' ], 52 silly audit 'deep-extend': [ '0.6.0' ], 52 silly audit delegates: [ '1.0.0' ], 52 silly audit depd: [ '1.1.2' ], 52 silly audit destroy: [ '1.0.4' ], 52 silly audit 'detect-libc': [ '1.0.3' ], 52 silly audit dotenv: [ '16.0.0' ], 52 silly audit 'ee-first': [ '1.1.1' ], 52 silly audit ejs: [ '3.1.6' ], 52 silly audit 'emoji-regex': [ '8.0.0' ], 52 silly audit encodeurl: [ '1.0.2' ], 52 silly audit encoding: [ '0.1.13' ], 52 silly audit 'env-paths': [ '2.2.1' ], 52 silly audit 'err-code': [ '2.0.3' ], 52 silly audit 'escape-html': [ '1.0.3' ], 52 silly audit 'escape-string-regexp': [ '1.0.5' ], 52 silly audit etag: [ '1.8.1' ], 52 silly audit express: [ '4.17.2' ], 52 silly audit filelist: [ '1.0.2' ], 52 silly audit finalhandler: [ '1.1.2' ], 52 silly audit forwarded: [ '0.2.0' ], 52 silly audit fresh: [ '0.5.2' ], 52 silly audit 'fs-minipass': [ '2.1.0', '1.2.7' ], 52 silly audit 'fs.realpath': [ '1.0.0' ], 52 silly audit glob: [ '7.2.0' ], 52 silly audit 'graceful-fs': [ '4.2.9' ], 52 silly audit 'has-flag': [ '3.0.0' ], 52 silly audit 'has-unicode': [ '2.0.1' ], 52 silly audit 'http-cache-semantics': [ '4.1.0' ], 52 silly audit 'http-errors': [ '1.8.1' ], 52 silly audit 'http-proxy-agent': [ '4.0.1' ], 52 silly audit 'https-proxy-agent': [ '5.0.0' ], 52 silly audit 'humanize-ms': [ '1.2.1' ], 52 silly audit 'ignore-walk': [ '3.0.4' ], 52 silly audit imurmurhash: [ '0.1.4' ], 52 silly audit 'indent-string': [ '4.0.0' ], 52 silly audit 'infer-owner': [ '1.0.4' ], 52 silly audit inflight: [ '1.0.6' ], 52 silly audit inherits: [ '2.0.4' ], 52 silly audit ini: [ '1.3.8' ], 52 silly audit ip: [ '1.1.5' ], 52 silly audit 'ipaddr.js': [ '1.9.1' ], 52 silly audit 'is-fullwidth-code-point': [ '3.0.0', '1.0.0' ], 52 silly audit 'is-lambda': [ '1.0.1' ], 52 silly audit isarray: [ '1.0.0' ], 52 silly audit isexe: [ '2.0.0' ], 52 silly audit jake: [ '10.8.2' ], 52 silly audit 'lru-cache': [ '6.0.0' ], 52 silly audit 'make-dir': [ '3.1.0' ], 52 silly audit semver: [ '6.3.0', '5.7.1', '7.3.5' ], 52 silly audit 'make-fetch-happen': [ '9.1.0' ], 52 silly audit 'media-typer': [ '0.3.0' ], 52 silly audit 'merge-descriptors': [ '1.0.1' ], 52 silly audit methods: [ '1.1.2' ], 52 silly audit mime: [ '1.6.0' ], 52 silly audit 'mime-db': [ '1.51.0' ], 52 silly audit 'mime-types': [ '2.1.34' ], 52 silly audit minimatch: [ '3.0.5' ], 52 silly audit minimist: [ '1.2.5' ], 52 silly audit minipass: [ '3.1.6', '2.9.0' ], 52 silly audit 'minipass-collect': [ '1.0.2' ], 52 silly audit 'minipass-fetch': [ '1.4.1' ], 52 silly audit 'minipass-flush': [ '1.0.5' ], 52 silly audit 'minipass-pipeline': [ '1.2.4' ], 52 silly audit 'minipass-sized': [ '1.0.3' ], 52 silly audit minizlib: [ '2.1.2', '1.3.3' ], 52 silly audit mkdirp: [ '1.0.4', '0.5.5' ], 52 silly audit needle: [ '2.9.1' ], 52 silly audit negotiator: [ '0.6.3' ], 52 silly audit 'node-fetch': [ '2.6.7' ], 52 silly audit 'node-gyp': [ '8.4.1' ], 52 silly audit 'node-pre-gyp': [ '0.17.0' ], 52 silly audit nopt: [ '4.0.3', '5.0.0' ], 52 silly audit 'readable-stream': [ '2.3.7', '3.6.0' ], 52 silly audit 'safe-buffer': [ '5.1.2', '5.2.1' ], 52 silly audit rimraf: [ '2.7.1', '3.0.2' ], 52 silly audit string_decoder: [ '1.1.1', '1.3.0' ], 52 silly audit 'string-width': [ '1.0.2', '4.2.3' ], 52 silly audit 'strip-ansi': [ '3.0.1', '6.0.1' ], 52 silly audit tar: [ '4.4.19', '6.1.11' ], 52 silly audit yallist: [ '3.1.1', '4.0.0' ], 52 silly audit 'npm-bundled': [ '1.1.2' ], 52 silly audit 'npm-normalize-package-bin': [ '1.0.1' ], 52 silly audit 'npm-packlist': [ '1.4.8' ], 52 silly audit 'number-is-nan': [ '1.0.1' ], 52 silly audit 'object-assign': [ '4.1.1' ], 52 silly audit 'on-finished': [ '2.3.0' ], 52 silly audit once: [ '1.4.0' ], 52 silly audit 'os-homedir': [ '1.0.2' ], 52 silly audit 'os-tmpdir': [ '1.0.2' ], 52 silly audit osenv: [ '0.1.5' ], 52 silly audit 'p-map': [ '4.0.0' ], 52 silly audit parseurl: [ '1.3.3' ], 52 silly audit 'path-is-absolute': [ '1.0.1' ], 52 silly audit 'path-to-regexp': [ '0.1.7' ], 52 silly audit 'process-nextick-args': [ '2.0.1' ], 52 silly audit 'promise-inflight': [ '1.0.1' ], 52 silly audit 'promise-retry': [ '2.0.1' ], 52 silly audit 'proxy-addr': [ '2.0.7' ], 52 silly audit qs: [ '6.9.6' ], 52 silly audit 'range-parser': [ '1.2.1' ], 52 silly audit 'raw-body': [ '2.4.2' ], 52 silly audit rc: [ '1.2.8' ], 52 silly audit retry: [ '0.12.0' ], 52 silly audit 'safer-buffer': [ '2.1.2' ], 52 silly audit sax: [ '1.2.4' ], 52 silly audit send: [ '0.17.2' ], 52 silly audit 'serve-static': [ '1.14.2' ], 52 silly audit 'set-blocking': [ '2.0.0' ], 52 silly audit setprototypeof: [ '1.2.0' ], 52 silly audit 'signal-exit': [ '3.0.7' ], 52 silly audit 'smart-buffer': [ '4.2.0' ], 52 silly audit socks: [ '2.6.2' ], 52 silly audit 'socks-proxy-agent': [ '6.1.1' ], 52 silly audit ssri: [ '8.0.1' ], 52 silly audit statuses: [ '1.5.0' ], 52 silly audit 'strip-json-comments': [ '2.0.1' ], 52 silly audit 'supports-color': [ '5.5.0' ], 52 silly audit toidentifier: [ '1.0.1' ], 52 silly audit tr46: [ '0.0.3' ], 52 silly audit 'type-is': [ '1.6.18' ], 52 silly audit 'unique-filename': [ '1.1.1' ], 52 silly audit 'unique-slug': [ '2.0.2' ], 52 silly audit unpipe: [ '1.0.0' ], 52 silly audit 'util-deprecate': [ '1.0.2' ], 52 silly audit 'utils-merge': [ '1.0.1' ], 52 silly audit vary: [ '1.1.2' ], 52 silly audit 'webidl-conversions': [ '3.0.1' ], 52 silly audit 'whatwg-url': [ '5.0.0' ], 52 silly audit which: [ '2.0.2' ], 52 silly audit 'wide-align': [ '1.1.5' ], 52 silly audit wrappy: [ '1.0.2' ], 52 silly audit bcrypt: [ '5.0.1' ], 52 silly audit 'node-addon-api': [ '3.2.1' ] 52 silly audit } 53 timing reifyNode:node_modules/bcrypt Completed in 105ms 54 timing reifyNode:node_modules/node-addon-api Completed in 109ms 55 timing reify:unpack Completed in 109ms 56 timing reify:unretire Completed in 0ms 57 timing build:queue Completed in 1ms 58 info run bcrypt@5.0.1 install node_modules/bcrypt node-pre-gyp install --fallback-to-build 59 info run bcrypt@5.0.1 install { code: 1, signal: null } 60 timing reify:rollback:createSparse Completed in 13ms 61 timing reify:rollback:retireShallow Completed in 1ms 62 timing command:i Completed in 2169ms 63 verbose stack Error: command failed 63 verbose stack at ChildProcess.<anonymous> (C:\Users\Clay\.nvm\versions\node\v16.14.0\bin\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27) 63 verbose stack at ChildProcess.emit (node:events:520:28) 63 verbose stack at maybeClose (node:internal/child_process:1092:16) 63 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) 64 verbose pkgid bcrypt@5.0.1 65 verbose cwd D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\32. Authentication & Security\Secrets 66 verbose Windows_NT 10.0.19044 67 verbose argv "C:\\Users\\Clay\\.nvm\\versions\\node\\v16.14.0\\bin\\node.exe" "C:\\Users\\Clay\\.nvm\\versions\\node\\v16.14.0\\bin\\node_modules\\npm\\bin\\npm-cli.js" "i" "bcrypt" 68 verbose node v16.14.0 69 verbose npm v8.3.1 70 error code 1 71 error path D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\32. Authentication & Security\Secrets\node_modules\bcrypt 72 error command failed 73 error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build 74 error 'Security\Secrets\node_modules\.bin\' is not recognized as an internal or external command, 74 error operable program or batch file. 74 error node:internal/modules/cjs/loader:936 74 error throw err; 74 error ^ 74 error 74 error Error: Cannot find module 'D:\Courses\The Complete 2021 Web Development Bootcamp\Course Material\node-pre-gyp\bin\node-pre-gyp' 74 error at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) 74 error at Function.Module._load (node:internal/modules/cjs/loader:778:27) 74 error at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) 74 error at node:internal/main/run_main_module:17:47 { 74 error code: 'MODULE_NOT_FOUND', 74 error requireStack: [] 74 error } 75 verbose exit 1 76 timing npm Completed in 2666ms 77 verbose unfinished npm timer reify 1644754691583 78 verbose unfinished npm timer reify:audit 1644754693438 79 verbose unfinished npm timer auditReport:getReport 1644754693438 80 verbose unfinished npm timer reify:build 1644754693556 81 verbose unfinished npm timer build 1644754693557 82 verbose unfinished npm timer build:deps 1644754693557 83 verbose unfinished npm timer build:run:install 1644754693558 84 verbose unfinished npm timer build:run:install:node_modules/bcrypt 1644754693559 85 verbose code 1 86 error A complete log of this run can be found in: 86 error C:\Users\Clay\AppData\Local\npm-cache\_logs\2022-02-13T12_18_11_103Z-debug-0.log

VishalSharma2000 commented 2 years ago

@AbdallahEssamGaber I feel you are getting this problem because of the file names.

By this 'Security\Secrets\node_modules.bin' is not recognized as an internal or external command line it is surely seen that cmd is taking this as another command.

If you are still getting this error can you please try removing all special characters and spaces from your file name and then try to install bcrypt.

AbdallahEssamGaber commented 2 years ago

@VishalSharma2000 I did remove all special characters and spaces and still didnt work

Airlo-eng commented 2 years ago

@AbdallahEssamGaber I am getting the same issue and am just wondering if you managed to fix it and if so how?

CamiloMachado commented 2 years ago

I am have the same problem too, on windows 11.

CamiloMachado commented 2 years ago

I solve my problem reinstall node, remove files package.json, package-lock.json and node_module dir. and make npm init again and npm install. Save dependencies and put in package.json again.

JoyKarmoker commented 2 years ago

I had the same issue and solved it by removing the spaces and special characters in the path and file name.

recrsn commented 1 year ago

Tracking here: https://github.com/kelektiv/node.bcrypt.js/issues/961