Vscode: 디버거 좩돌- "였λ₯˜ : '/bcrypt_lib.node'λͺ¨λ“ˆμ΄ λ‹€λ₯Έ Node.js 버전에 λŒ€ν•΄ μ»΄νŒŒμΌλ˜μ—ˆμŠ΅λ‹ˆλ‹€ ..."

에 λ§Œλ“  2018λ…„ 12μ›” 12일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: microsoft/vscode

CPU

| Intel (R) Core (TM) i7-8650U CPU @ 1.90GHz (8 x 816)
-| -

GPU μƒνƒœ

| 2d_canvas: unavailable_softwarechecker_imaging: disabled_offflash_3d: unavailable_softwareflash_stage3d: unavailable_softwareflash_stage3d_baseline: unavailable_softwaregpu_compositing: unavailable_softwaremultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: unavailable_softwarevideo_decode: unavailable_softwarevideo_encode: unavailable_softwarewebgl: enabled_readbackwebgl2: unavailable_off

λ‘œλ“œ (평균) | 1, 1, 1

λ©”λͺ¨λ¦¬ (μ‹œμŠ€ν…œ) | 15.42GB (4.06GB 무료)

Argv 처리 | --gpu λΉ„ν™œμ„±ν™”

슀크린 리더 | μ•„λ‹ˆ

VM | 0 %

버전 : 1.29.1
컀밋 : bc24f98b5f70467bc689abf41cc5550ca637088e
λ‚ μ§œ : 2018-11-15T19 : 07 : 43.495Z
μ „μž : 2.0.12
크둬 : 61.0.3163.100
Node.js : 8.9.3
V8 : 6.1.534.41
μ•„ν‚€ν…μ²˜ : x64

μž¬ν˜„ 단계 :

  1. bcrypt λͺ¨λ“ˆμ„ μ‚¬μš©ν•˜λŠ” λ…Έλ“œ μ„œλ²„ 보유
  2. λ‹€μŒ μ„€μ •μœΌλ‘œ 디버거λ₯Ό μ‚¬μš©ν•˜μ‹­μ‹œμ˜€.
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}/build/index.js",
            "preLaunchTask": "tsc: build - tsconfig.json",
            "outFiles": [
                "${workspaceFolder}/build/**/*.js"
            ]
        }
    ]
}
  1. λ‹€μŒ 였λ₯˜μ— μœ μ˜ν•˜μ‹­μ‹œμ˜€.
module.js:682
  return process.dlopen(module, path._makeLong(filename));
                 ^
Error: The module '/home/calebjay/Documents/work/internal-admin/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

λ‚˜λŠ” μ‹œλ„ν–ˆλ‹€

  1. rm -rf node_modules λ‹€μŒμ— npm install
  2. λ‹€μ–‘ν•œ λ²„μ „μ˜ nvm use (package.json에 "node": "10.13.0", )
  3. npm rebuild

앱이 λΉŒλ“œλ˜κ³  vscode 디버거 μ™ΈλΆ€μ—μ„œ μ œκ³΅λ˜λŠ” 경우 였λ₯˜κ°€ λ°œμƒν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 였λ₯˜λŠ” 디버거에 κ³ μœ ν•©λ‹ˆλ‹€.

λͺ¨λ“  ν™•μž₯이 λΉ„ν™œμ„±ν™” 된 경우이 λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆκΉŒ? : 예

debug

λͺ¨λ“  3 λŒ“κΈ€

λΏ‘ 빡뀨
κΈ°λ³Έ node.js 버전은 λ¬΄μ—‡μž…λ‹ˆκΉŒ?
VS Code 외뢀와 VS Code의 톡합 터미널 λ‚΄λΆ€μ—μ„œ node --version μ‹€ν–‰ν•©λ‹ˆλ‹€.
두 경우 λͺ¨λ‘ λ™μΌν•œ 버전이 ν‘œμ‹œλ©λ‹ˆκΉŒ?

"nvm"λ˜λŠ” "nvs"λ₯Ό μ‚¬μš©ν•˜λŠ” 경우 "runtimeVersion": "x.y.z" λ₯Ό μ‹œμž‘ ꡬ성에 μΆ”κ°€ν•˜μ—¬ VS Codeκ°€ νŠΉμ • λ²„μ „μ˜ node.jsλ₯Ό μ‚¬μš©ν•˜λ„λ‘ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

였, μ•Œκ² μŠ΅λ‹ˆλ‹€. κ³ λ €ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

톡합 VSCode 터미널 λ‚΄λΆ€μ˜ npm version λŠ” 10.13.0 이고 μ‹€μ œ 터미널 λ‚΄λΆ€μ—λŠ” 8.1... 무언가가 μžˆμŠ΅λ‹ˆλ‹€. κ·Έλž˜μ„œ vscode μ™ΈλΆ€μ—μ„œ

nvm use 10.13.0

npm rebuild

그런 λ‹€μŒ vscode λ‚΄λΆ€μ—μ„œ 디버거λ₯Ό μ‚¬μš©ν•˜λ €κ³  μ‹œλ„ν–ˆμ§€λ§Œ μ—¬μ „νžˆ λ‹€μŒ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing

이것은 μ•„λ§ˆλ„ VSCODE 버그가 μ•„λ‹ˆλ©° 이제 터미널 버전에 차이가 μžˆμŒμ„ μ•Œ 수 μžˆμŠ΅λ‹ˆλ‹€. μ–΄μ¨Œλ“  λ‹Ήμ‹ μ˜ 도움에 κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€. μ•½κ°„ ν˜Όλž€ μŠ€λŸ¬μ›Œμš” ... NODE_MODULE_VERSION 64 λ˜λŠ” 57 에 맀핑 ν•  λ…Έλ“œμ˜ 버전을 λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€. 그런 μ‹μœΌλ‘œ μ°Έμ‘°ν•˜λŠ” 것을 λ³Έ 적이 μ—†μŠ΅λ‹ˆλ‹€ ...

nvm을 μ‚¬μš©ν•˜λŠ” 경우 VS Codeκ°€ nvm의 λ…Έλ“œ 버전을 μ„ νƒν•˜λŠ”μ§€ ν™•μΈν•΄μ•Όν•©λ‹ˆλ‹€ (nvm이 ν™˜κ²½ λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜μ§€ μ•Šκ³  λŒ€μ‹  μ‰˜ ν•¨μˆ˜λ₯Ό μ‚¬μš©ν•˜κΈ° λ•Œλ¬Έμ— λ³΄μ΄λŠ” κ²ƒμ²˜λŸΌ κ°„λ‹¨ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. https : // stackoverflow μ°Έμ‘°). .com / questions / 44700432 / visual-studio-code-to-use-node-version-specified-by-nvm).

보닀 λͺ…μ‹œμ μΈ (λ”°λΌμ„œ ν•„μžκ°€ ꢌμž₯ν•˜λŠ”) μ ‘κ·Ό 방식은 μ‹œμž‘ ꡬ성에 "runtimeVersion": "8.1.0" μΆ”κ°€λ₯Ό μ‚¬μš©ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.


npm rebuild κ°€ λ‹€λ₯Έ λ²„μ „μ˜ λ…Έλ“œμ— λŒ€ν•΄ λ„€μ΄ν‹°λΈŒ λͺ¨λ“ˆμ„ λ‹€μ‹œ λΉŒλ“œν•˜λŠ” 데 μΆ©λΆ„ν•œ 지 μ—¬λΆ€λŠ” μ•Œ 수 μ—†μŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰