반응형
Error
Windows PC에서 NodeJS로 작성된 web application 소스코드를 내려받아
npm install를 실행하여 모듈을 설치하려고 할 때, 아래와 같은 에러가 발생함
pm ERR! path C:\Users\user\Desktop\me\workspace\node-study\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\nvm\v16.16.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\user\Desktop\me\workspace\node-study\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\user\Desktop\me\workspace\node-study\node_modules\sqlite3\lib\binding\node-v93-win32-x64' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.6.38
npm ERR! node-pre-gyp info using node@16.16.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\user\Desktop\me\workspace\node-study\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@16.16.0 (node-v93 ABI) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v93-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@16.16.0 (node-v93 ABI) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http Connection closed while downloading tarball file
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | win32 | x64
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | win32 | x64
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@16.16.0 | win32 | x64
npm ERR! gypgyp info info find Pythonfind Python using Python version 3.10.5 found at "C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! using Python version 3.10.5 found at "C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-arm64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-x86/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-arm64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.16.0/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/win-x86/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v16.16.0/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/win-x64/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v16.16.0/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.16.0/win-x86/node.lib
npm ERR! gyp info find VS using VS2017 (15.9.28307.2019) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\user\AppData\Local\Programs\Python\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Roaming\\nvm\\v16.16.0\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\Desktop\\me\\workspace\\node-study\\node_modules\\sqlite3\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Roaming\\nvm\\v16.16.0\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\user\\AppData\\Local\\node-gyp\\Cache\\16.16.0\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\user\\AppData\\Local\\node-gyp\\Cache\\16.16.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\user\\AppData\\Roaming\\nvm\\v16.16.0\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.16.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\user\\Desktop\\me\\workspace\\node-study\\node_modules\\sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\Users\\user\\Desktop\\me\\workspace\\node-study\\node_modules\\sqlite3\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info find VS using VS2017 (15.9.28307.2019) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
... (중략) ...
반응형
Solution
sqlite3에서 의존하는 모듈 중, node-pre-gyp라는 모듈을 의존하는데, node-pre-gyp에는 windows-build-tools, node-gyp를 의존하고 있기 때문에 아래 두 명령어를 통해 설치해주면 해결됨!
npm install --global --production windows-build-tools
npm install --global node-gyp
** npm install --global --production windows-build-tools 실행시 아주 오래 걸림.. ㅡ.ㅡ
Thank you!
반응형
'Language > Node.js' 카테고리의 다른 글
[Node.js] Sequelize X Mocha를 이용하여 TEST 시, 테이블 does not exist 문제해결 (0) | 2022.08.21 |
---|---|
[NodeJS Error] Windows에서 npm ERR! gyp gypERR! find Python Python is not set from environment variable PYTHON 해결방법 (0) | 2022.07.15 |
[TDD기반 Node.js 공부하기] 05. macha, should, superTest 사용하기 (0) | 2022.07.14 |
[TDD기반 Node.js 공부하기] 04. npm이란? (0) | 2022.06.21 |
[TDD기반 Node.js 공부하기] 03. ExpressJS 기초 (0) | 2022.06.13 |