Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Error installing lz4 #119

Open
Allen-P12 opened this issue Mar 20, 2024 · 2 comments
Open

Error installing lz4 #119

Allen-P12 opened this issue Mar 20, 2024 · 2 comments

Comments

@Allen-P12
Copy link

I have a react/node.js project I am working on that I want to use the @databricks/sql v1.8.1 module on my machine running windows 10. The lz4 module is a dependency, and I keep running into this error when trying to install either one. I have tried removing the node modules and package-lock, reinstalled node, ran the command in the command prompt and powershell as an admin with no luck.

Any advice?

node version: v20.10.0
npm: v10.2.0

Error when I run "npm install lz4":

PS C:\Users\github> npm install lz4
npm ERR! code 1
npm ERR! path C:\Users\github\node_modules\lz4
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.10.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.0 found at "C:\Program Files\Python311\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: ENOENT: no such file or directory, open 'C:\path\to\your\cert.pem'
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\github\node_modules\lz4
npm ERR! gyp ERR! node -v v20.10.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

@kravets-levko
Copy link

Hi @Allen-P12! Looks that node-gyp failed to download Nodejs header files (the URL you can see in logs you shared) - it tries to use a non-existing certificate or something like this. I think it's not related to node-lz4 but rather to your development environment. Please check if you can download those headers from your browser, then try to access that URL using the Nodejs installed on your machine

@Allen-P12
Copy link
Author

Hi @kravets-levko, thank you for the help! It ended up being that .tar.gz files were defaulted to opening using the raspberry pi imager on my machine. Changing the default program to the 7 zip file manager for that file type, deleting the node modules, and re-doing the npm install resolved the issue and lz4 installed correctly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants