Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails on Mac #2

Open
andig opened this issue Jun 2, 2024 · 2 comments
Open

npm install fails on Mac #2

andig opened this issue Jun 2, 2024 · 2 comments

Comments

@andig
Copy link

andig commented Jun 2, 2024

This is in a fresh git clone:

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '/Users/andig/htdocs/Cloneable/node_modules/electron-chromedriver',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/Users/andig/htdocs/Cloneable/node_modules/electron-chromedriver'] {
npm warn cleanup       errno: -66,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/Users/andig/htdocs/Cloneable/node_modules/electron-chromedriver'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '/Users/andig/htdocs/Cloneable/node_modules',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/Users/andig/htdocs/Cloneable/node_modules/electron-chromedriver'] {
npm warn cleanup       errno: -66,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/Users/andig/htdocs/Cloneable/node_modules/electron-chromedriver'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path /Users/andig/htdocs/Cloneable/node_modules/better-sqlite3
npm error command failed
npm error command sh -c prebuild-install || npm run build-release
npm error > [email protected] build-release
npm error > node-gyp rebuild --release
npm error prebuild-install warn install No prebuilt binaries found (target=22.2.0 runtime=node arch=arm64 libc= platform=darwin)
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | darwin | arm64
npm error gyp info find Python using Python version 3.12.3 found at "/opt/homebrew/opt/[email protected]/bin/python3.12"
npm error gyp WARN install got an error, rolling back install
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: ENOENT: no such file or directory, stat '/tmp/node-v16.14.0-headers.tar.gz'
npm error gyp ERR! System Darwin 23.5.0
npm error gyp ERR! command "/opt/homebrew/Cellar/node/22.2.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm error gyp ERR! cwd /Users/andig/htdocs/Cloneable/node_modules/better-sqlite3
npm error gyp ERR! node -v v22.2.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok

npm error A complete log of this run can be found in: /Users/andig/.npm/_logs/2024-06-02T18_45_09_731Z-debug-0.log
@ChrisMoutsos
Copy link
Collaborator

Hi,

It seems you are using Node v22.2.0, instead of the recommended v16.13.1 (as specified in the .nvmrc file). Is there a reason for that? If I use Node v22.2.0, I get a similar error from the better-sqlite3 package.

I'll add a step to the installation instructions to use nvm or similar to use the correct version of Node before attempting to install.

@ChrisMoutsos
Copy link
Collaborator

Ok, I added these lines to the installation instructions:

nvm install
nvm use

which should fix this issue for you. Please let me know.

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

No branches or pull requests

2 participants