safeql: Unable to install using npm
Describe the bug I can’t install using npm by this script
npm install --save-dev @ts-safeql/eslint-plugin libpg-query
does this library require Python to be installed on the machine??
because I got this error ->
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm error code 1
npm error path D:\app\backend-nestjs\node_modules\libpg-query
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\USER NAME\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\app\backend-nestjs\node_modules\libpg-query\build\Release\queryparser.node --module_name=queryparser --module_path=D:\app\backend-nestjs\node_modules\libpg-query\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm error node-pre-gyp info it worked if it ends with ok
npm error node-pre-gyp info using node-pre-gyp@1.0.11
npm error node-pre-gyp info using node@20.16.0 | win32 | x64
npm error node-pre-gyp info check checked for "D:\app\backend-nestjs\node_modules\libpg-query\build\Release\queryparser.node" (not found)
npm error node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.2.0-node-v115-win32-x64.tar.gz
npm error node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.2.0-node-v115-win32-x64.tar.gz
npm error node-pre-gyp WARN Pre-built binaries not installable for libpg-query@16.2.0 and node@20.16.0 (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
npm error node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.2.0-node-v115-win32-x64.tar.gz
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@20.16.0 | win32 | x64
npm error gyp info ok
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@20.16.0 | win32 | x64
npm error gyp ERR! find Python
npm error gyp ERR! find Python Python is not set from command line or npm configuration
npm error gyp ERR! find Python Python is not set from environment variable PYTHON
npm error gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python checking if "python3" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python checking if "python" can be used
npm error gyp ERR! find Python - executable path is ""
npm error gyp ERR! find Python - "" could not be run
npm error gyp ERR! find Python checking if Python is C:\Users\USER NAME\AppData\Local\Programs\Python\Python311\python.exe
npm error gyp ERR! find Python - version is ""
npm error gyp ERR! find Python - version is - should be >=3.6.0
npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
npm error gyp ERR! find Python - "C:\Users\USER NAME\AppData\Local\Programs\Python\Python311\python.exe" could not be run
npm error gyp ERR! find Python checking if Python is C:\Program Files\Python311\python.exe
npm error gyp ERR! find Python - version is ""
npm error gyp ERR! find Python - version is - should be >=3.6.0
npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
npm error gyp ERR! find Python - "C:\Program Files\Python311\python.exe" could not be run
npm error gyp ERR! find Python checking if Python is C:\Users\USER NAME\AppData\Local\Programs\Python\Python311-32\python.exe
Desktop (please complete the following information):
- OS: Windows 11
- PostgreSQL version [e.g. 13, 14]
- Version [e.g. 22]
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (7 by maintainers)
To get Python and other build tools installed on Windows, you may want to consider installing Chocolatey
If you did this, you could use the following command to install
pythonandvisualstudio2022-workload-vctools:since there’s no pre-compiled libpg-query build for your OS (Windows 11), it tries to compile it on your end using Python. Although, it appears like you don’t have Python installed on your machine