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 when installing repo dependencies for development #20370

Open
2 tasks done
alt-glitch opened this issue Jan 12, 2024 · 24 comments
Open
2 tasks done

npm install fails when installing repo dependencies for development #20370

alt-glitch opened this issue Jan 12, 2024 · 24 comments
Assignees
Labels
bug Something isn't working

Comments

@alt-glitch
Copy link

alt-glitch commented Jan 12, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

On running npm install after cloning the repository, it fails with the following log (some parts trimmed) :

glitch@instance-3:~/supabase$ npm i
npm ERR! code 1
npm ERR! path /home/glitch/supabase/node_modules/@gregnr/libpg-query
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! make: Entering directory '/home/glitch/supabase/node_modules/@gregnr/libpg-query/build'
npm ERR!   CC(target) Release/obj.target/nothing/node_modules/node-addon-api/nothing.o
npm ERR! rm -f Release/obj.target/node_modules/node-addon-api/nothing.a Release/obj.target/node_modules/node-addon-api/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/node_modules/node-addon-api/nothing.a`
npm ERR! ar crs Release/obj.target/node_modules/node-addon-api/nothing.a @Release/obj.target/node_modules/node-addon-api/nothing.a.ar-file-list
npm ERR!   COPY Release/nothing.a
npm ERR!   ACTION binding_gyp_queryparser_target_prebuild_dependencies libpg_query/include/pg_query.h
npm ERR! make[1]: Entering directory '/tmp/tmp.Ztle2IBnbL/libpg_query'
npm ERR! compiling src/pg_query.c
<--- trimmed --->
npm ERR! make[1]: Leaving directory '/tmp/tmp.Ztle2IBnbL/libpg_query'
npm ERR! ERROR: 'make' command failed
npm ERR! make: Leaving directory '/home/glitch/supabase/node_modules/@gregnr/libpg-query/build'
npm ERR! Failed to execute '/home/glitch/.nvm/versions/node/v18.19.0/bin/node /home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release/queryparser.node --module_name=queryparser --module_path=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.11
npm ERR! node-pre-gyp info using node@18.19.0 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release/queryparser.node" (not found)
npm ERR! node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @gregnr/libpg-query@13.4.0-dev.12 and node@18.19.0 (node-v108 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
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@18.19.0 | linux | x64
npm ERR! gyp info ok
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@18.19.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.19.0/node-v18.19.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.19.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/glitch/.nvm/versions/node/v18.19.0/lib/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 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/glitch/.cache/node-gyp/18.19.0/include/node/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=/home/glitch/.cache/node-gyp/18.19.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/glitch/.cache/node-gyp/18.19.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/glitch/supabase/node_modules/@gregnr/libpg-query',
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 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
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@18.19.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! Cloning into 'libpg_query'...
npm ERR! Note: switching to '1097b2c33e54a37c0d2c0f2d498c7d1cf967eae9'.
npm ERR!
npm ERR! You are in 'detached HEAD' state. You can look around, make experimental
npm ERR! changes and commit them, and you can discard any commits you make in this
npm ERR! state without impacting any branches by switching back to a branch.
npm ERR!
npm ERR! If you want to create a new branch to retain commits you create, you may
npm ERR! do so (now or later) by using -c with the switch command. Example:
npm ERR!
npm ERR!   git switch -c <new-branch-name>
npm ERR!
npm ERR! Or undo this operation with:
npm ERR!
npm ERR!   git switch -
npm ERR!
npm ERR! Turn off this advice by setting config variable advice.detachedHead to false
npm ERR!
npm ERR! HEAD is now at 1097b2c Release 13-2.2.0
npm ERR! src/postgres/src_port_snprintf.c:374:1: error: conflicting types for ‘strchrnul’; have ‘const char *(const char *, int)’
npm ERR!   374 | strchrnul(const char *s, int c)
npm ERR!       | ^~~~~~~~~
npm ERR! In file included from ./src/postgres/include/c.h:61,
npm ERR!                  from src/postgres/src_port_snprintf.c:62:
npm ERR! /usr/include/string.h:286:14: note: previous declaration of ‘strchrnul’ with type ‘char *(const char *, int)’
npm ERR!   286 | extern char *strchrnul (const char *__s, int __c)
npm ERR!       |              ^~~~~~~~~
npm ERR! make[1]: *** [Makefile:171: src/postgres/src_port_snprintf.o] Error 1
npm ERR! make: *** [queryparser.target.mk:13: libpg_query/include/pg_query.h] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.5.0-1008-gcp
npm ERR! gyp ERR! command "/home/glitch/.nvm/versions/node/v18.19.0/bin/node" "/home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release/queryparser.node" "--module_name=queryparser" "--module_path=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /home/glitch/supabase/node_modules/@gregnr/libpg-query
npm ERR! gyp ERR! node -v v18.19.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/home/glitch/.nvm/versions/node/v18.19.0/bin/node /home/glitch/.nvm/versions/node/v18.19.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release/queryparser.node --module_name=queryparser --module_path=/home/glitch/supabase/node_modules/@gregnr/libpg-query/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/glitch/supabase/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:303:5)
npm ERR! node-pre-gyp ERR! System Linux 6.5.0-1008-gcp
npm ERR! node-pre-gyp ERR! command "/home/glitch/.nvm/versions/node/v18.19.0/bin/node" "/home/glitch/supabase/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/glitch/supabase/node_modules/@gregnr/libpg-query
npm ERR! node-pre-gyp ERR! node -v v18.19.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/glitch/.npm/_logs/2024-01-12T05_48_50_483Z-debug-0.log

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Follow the steps mentioned here. Clone the repo and install dependencies
  2. It should fail.

System information

  • OS: Tried on Arch Linux (EndeavourOS) and Ubuntu 23.10
  • Version of npm: 10.2.3 and 9.9.2
  • Version of Node.js: v21.5.0 v18.19.0

Additional context

Seems to me that @gregnr/libpg-query package isn't building properly. I also notice that this URL: https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz is returning a 404.

Do let me know if I can give more information about my systems. I've tried and tested this both on my local machine and Ubuntu box.

Thanks!

@alt-glitch alt-glitch added the bug Something isn't working label Jan 12, 2024
@jordienr
Copy link
Member

Hey @alt-glitch I just tried a clean install following the guide and everythings working. Can you try deleting node_modules and doing a clean install with npm ci? Have you tried any other fixes?

Also make sure your package-lock file doesn't have any changes. LMK how it goes!

@alt-glitch
Copy link
Author

Hey @jordienr
Dropping an update.
npm ci results in the same error log. On both my machines. package-lock.json doesn't have any changes either.

I think the error is that;

  1. https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz contains pre-built binaries, which throws a 404.
npm ERR! node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @gregnr/libpg-query@13.4.0-dev.12 and node@18.19.0 (node-v108 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v108-linux-x64.tar.gz
  1. On getting the 404, it tries to compile it by itself which also fails due to some reason.

Let me know if I might be missing some dependencies on my system.


I found the following issue launchql/libpg-query-node#25. I went and tried to build libpg-query on my system and it failed with the same error. I used both Node 18 and 20 and it failed with the same result.

I will try to see what the issue is with my system, though it's peculiar that my ubuntu box behaves the same.

@iharshspatel
Copy link

Hey @jordienr,
Even after deleting node_modules & npm ci still facing the same issue as suggested by @alt-glitch.

@encima
Copy link
Contributor

encima commented Jan 14, 2024

hey there, the 404 may be a separate issue but the build you are trying needs the 'make' command. Which box are you running this on? Adding 'make' to the installed packages should address this, can you try that?

@alt-glitch
Copy link
Author

Hey @encima
I'm running this on both Arch and Ubuntu. make is installed on both of them.
I actually tried to make libpg-query-node by myself as well (using v13 and v16 and the v13 failed to make with the same error while I was able to make v16 successfully.

Does my postgres version make a difference?

❯ postgres -V
postgres (PostgreSQL) 16.1

Screenshots below:
image

@encima
Copy link
Contributor

encima commented Jan 14, 2024

it shouldn't make a difference (unless it wasn't install at all) but the fact you can make v16 is interesting.
I'll try to reproduce tomorrow on Ubuntu and report back.

@encima
Copy link
Contributor

encima commented Jan 15, 2024

Hi there,
I tested this with the following:

  • Clean install of Ubuntu 22.04.3 (note: without make installed)
  • Node v18.19.0
  • Latest supabase frommaster (1b34d5d8d3d735a8f23e5ae51f3f902243820cca)

Running npm install and npm ci works so I cannot reproduce :/

Are the machines arm or x86?

@encima encima self-assigned this Jan 15, 2024
@alt-glitch
Copy link
Author

alt-glitch commented Jan 18, 2024

Hey @encima!
I think I've found the source of this issue. It's an upstream dependency with libpg_query: pganalyze/libpg_query#202

Installing libpg_query fails when glibc=2.38 due strchrnul being available by default. I think that's why libpg-query-node built pre-compiled binaries re: launchql/libpg-query-node#25

Issue should be solved if the pre-compiled binary is available I think.

cc: @iharshspatel: can you check your glibc version using ldd --version? It should say 2.38 as well if you're facing the same issue as me

Edit: I'm interested in helping out solving this issue, want to contribute to Supabase! Maybe I can make the binaries required? Let me know how I can help :)

@ameerhazarika
Copy link

This issue still exists.
At first I thought it was maybe a node issue, or a visual code issue, but even after using different versions , I'm still unable to install the dependencies.
I'm using Windows 10. Maybe using Ubuntu might solve the issue since it's still working for you @encima

@encima
Copy link
Contributor

encima commented Jan 25, 2024

@ameerhazarika To confirm it is a windows only bug, can you try installing using WSL and report back please?

@ameerhazarika
Copy link

@encima Hey. I'm afraid I cannot use WSL since there's a BIOS password in my system. I'm not able to access the BIOS settings to enable virtualization.

@ameerhazarika
Copy link

I'm still working to resolve this whether or not it's a Windows issue. Will update if I find anything.

@ameerhazarika
Copy link

ameerhazarika commented Jan 29, 2024

@encima Hey. I tried running this on another system with Kali Linux installed. Followed all the steps as mentioned in the supabase documentation, and I was able to successfully setup the local development environment for Supabase on my system.
So I guess this is a Windows only issue.

@ameerhazarika
Copy link

@encima I think this issue is already being discussed for a long time now.
supabase/postgres-meta#387
launchql/libpg-query-node#22 (comment)

@encima
Copy link
Contributor

encima commented Jan 30, 2024

Thank you for the efforts you put in here!

It does indeed seem to be Windows only. If this is ok with you, I would close this issue to track supabase/postgres-meta#387 as the source?

I will check this internally with the team in case there is any new info..

@alt-glitch
Copy link
Author

Hey @encima
Would like to point out that I still face this issue on any Linux system with glibc=2.38 as I've pointed out in my comment above.

@encima
Copy link
Contributor

encima commented Jan 30, 2024

Noted, yep, and thanks for the offer of help!
Would you prefer to keep this open to track that or continue in the original issue?

@ameerhazarika
Copy link

Thank you for the efforts you put in here!

It does indeed seem to be Windows only. If this is ok with you, I would close this issue to track supabase/postgres-meta#387 as the source?

I will check this internally with the team in case there is any new info..

Yes, no issues. You can close it , but it seems @alt-glitch still has an issue on his system so there's that. Let me know if there are any updates from the team on this so we can help resolve it. Thank you

@xegulon
Copy link

xegulon commented Feb 4, 2024

I confirm the issue on my side, using latest Fedora Linux:

../node_modules/.pnpm/libpg-query@15.0.2/node_modules/libpg-query: Running install script, failed in 25.9s
.../node_modules/libpg-query install$ node-pre-gyp install --fallback-to-build
│ node-pre-gyp info it worked if it ends with ok
│ node-pre-gyp info using node-pre-gyp@1.0.11
│ node-pre-gyp info using node@20.11.0 | linux | x64
│ node-pre-gyp info check checked for "/home/XXXXXXXXX/xxxxxx/xxxxxxxxxxxxxx/node_modules/.pnpm/libpg-query@15.0.2/node_modules/libpg-query/build/Release/queryparser.node" (not found)
│ node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v15.0.2-node-v115-linux-x64.tar.gz
│ node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v15.0.2-node-v115-linux-x64.tar.gz 
│ node-pre-gyp WARN Pre-built binaries not installable for libpg-query@15.0.2 and node@20.11.0 (node-v115 ABI, glibc) (falling back to source compile with node-gyp) 
│ node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v15.0.2-node-v115-linux-x64.tar.gz 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@8.4.1
│ gyp info using node@20.11.0 | linux | x64
│ gyp info ok 
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@8.4.1
│ gyp info using node@20.11.0 | linux | x64
│ gyp info find Python using Python version 3.12.1 found at "/usr/bin/python3"

The issue happens when I run pnpm add -ED @ts-safeql/eslint-plugin libpg-query

@ytrkptl
Copy link

ytrkptl commented Feb 24, 2024

I tried following the instructions provided at the following link, and it still fails: https://github.com/supabase/supabase/blob/master/DEVELOPERS.md

In my case, on my Windows 10, here are the error messages I am getting:

npm WARN deprecated puppeteer@16.2.0: < 19.4.0 is no longer supported
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ytrkp\\supabase\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\ytrkp\supabase\node_modules\ajv-formats\node_modules\ajv'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ytrkp\\supabase\\node_modules\\ajv-formats\\node_modules\\ajv'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ytrkp\\supabase\\node_modules\\@gregnr',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query\.cache\emscripten-wasm'] {npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ytrkp\\supabase\\node_modules\\@gregnr\\libpg-query\\.cache\\emscripten-wasm'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query
npm ERR! command failed
npm ERR! command C:\Program Files\Git\bin\bash.exe -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\ytrkp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js 
configure --fallback-to-build --module=C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query\build\Release\queryparser.node --module_name=queryparser --module_path=C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.11
npm ERR! node-pre-gyp info using node@20.10.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query\build\Release\queryparser.node" (not found)     
npm ERR! node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v115-win32-x64.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v115-win32-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @gregnr/libpg-query@13.4.0-dev.12 and node@20.10.0 (node-v115 ABI, unknown) (falling 
back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v13.4.0-dev.12-node-v115-win32-x64.tar.gz
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 ok
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.12.0 found at "C:\Python312\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 http 200 https://nodejs.org/download/release/v20.10.0/node-v20.10.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v20.10.0/win-x64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.10.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v20.10.0/win-x64/node.lib
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2022 (17.8.34330.188) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS 
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Users\ytrkp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:113:11)
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Users\ytrkp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:69:17)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! gyp ERR! stack at async createBuildDir (C:\Users\ytrkp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26)     
npm ERR! gyp ERR! stack at async run (C:\Users\ytrkp\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ytrkp\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ytrkp\\supabase\\node_modules\\@gregnr\\libpg-query\\build\\Release\\queryparser.node" "--module_name=queryparser" "--module_path=C:\\Users\\ytrkp\\supabase\\node_modules\\@gregnr\\libpg-query\\build\\Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
npm ERR! gyp ERR! cwd C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query
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
npm ERR! node-pre-gyp ERR! build error
query\build\Release\queryparser.node --module_name=queryparser --module_path=C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v115' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\ytrkp\supabase\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) 
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ytrkp\\supabase\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\ytrkp\supabase\node_modules\@gregnr\libpg-query
npm ERR! node-pre-gyp ERR! node -v v20.10.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: C:\Users\ytrkp\AppData\Local\npm-cache\_logs\2024-02-24T12_49_55_955Z-debug-0.log

@encima
Copy link
Contributor

encima commented Mar 4, 2024

Hello all,

This is an issue with an external dependency. As some have noted, you can build this yourself for the system you run.

An alternative is to run the Supabase stack using the supabase CLI or using the docker file in the main repo.
What is your usecase for running the main Supabase repo locally?

@alabhyajindal
Copy link
Contributor

I wanted to run the repo locally so I can contribute.

@fsansalvadore
Copy link
Contributor

This might have been fixed by this PR #26618, which updates all @gregnr/libpg-query references to libpg-query.

@ymolists
Copy link

ymolists commented May 30, 2024

so far i tried this on a fresh ubuntu and nixos machines .. please someone tell me if there is a work around

git sha 483492564d75c1d399b4a1017b1bcdd0379f1793

ymo@ub00:~/3rdp/github/supabase/supabase-git/supabase.devbr$ npm i 
npm warn deprecated memfs@3.6.0: this will be v4
npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated puppeteer@16.2.0: < 19.4.0 is no longer supported
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules/puppeteer',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules/puppeteer/.local-chromium'] {
npm warn cleanup       errno: -39,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules/puppeteer/.local-chromium'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules/puppeteer/.local-chromium/linux-1022525/chrome-linux'] {
npm warn cleanup       errno: -39,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/apps/docs/node_modules/puppeteer/.local-chromium/linux-1022525/chrome-linux'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice
npm error code 1
npm error path /home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query
npm error command failed
npm error command sh -c node-pre-gyp install --fallback-to-build
npm error Failed to execute '/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/bin/node /home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query/build/Release/queryparser.node --module_name=queryparser --module_path=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/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.14.0 | linux | x64
npm error node-pre-gyp info check checked for "/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/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-v15.1.0-node-v115-linux-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-v15.1.0-node-v115-linux-x64.tar.gz 
npm error node-pre-gyp WARN Pre-built binaries not installable for libpg-query@15.1.0 and node@20.14.0 (node-v115 ABI, glibc) (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-v15.1.0-node-v115-linux-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.14.0 | linux | 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.14.0 | linux | x64
npm error gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
npm error gyp http GET https://nodejs.org/download/release/v20.14.0/node-v20.14.0-headers.tar.gz
npm error gyp http 200 https://nodejs.org/download/release/v20.14.0/node-v20.14.0-headers.tar.gz
npm error gyp http GET https://nodejs.org/download/release/v20.14.0/SHASUMS256.txt
npm error gyp http 200 https://nodejs.org/download/release/v20.14.0/SHASUMS256.txt
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/ymo/.cache/node-gyp/20.14.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/ymo/.cache/node-gyp/20.14.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/ymo/.cache/node-gyp/20.14.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
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.14.0 | linux | x64
npm error gyp ERR! build error 
npm error gyp ERR! stack Error: not found: make
npm error gyp ERR! stack at getNotFoundError (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/which/lib/index.js:16:17)
npm error gyp ERR! stack at which (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/which/lib/index.js:77:9)
npm error gyp ERR! stack at async doWhich (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:112:22)
npm error gyp ERR! stack at async loadConfigGypi (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:77:7)
npm error gyp ERR! stack at async build (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:35:3)
npm error gyp ERR! stack at async run (/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
npm error gyp ERR! System Linux 6.1.86
npm error gyp ERR! command "/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/bin/node" "/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query/build/Release/queryparser.node" "--module_name=queryparser" "--module_path=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v115"
npm error gyp ERR! cwd /home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query
npm error gyp ERR! node -v v20.14.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok 
npm error node-pre-gyp ERR! build error 
npm error node-pre-gyp ERR! stack Error: Failed to execute '/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/bin/node /home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query/build/Release/queryparser.node --module_name=queryparser --module_path=/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/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 ERR! stack     at ChildProcess.<anonymous> (/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
npm error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1105:16)
npm error node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error node-pre-gyp ERR! System Linux 6.1.86
npm error node-pre-gyp ERR! command "/home/ymo/3rdp/dev/nodejs/nodejs-rel/node-v20.14.0-linux-x64/bin/node" "/home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm error node-pre-gyp ERR! cwd /home/ymo/3rdp/github/supabase/supabase-git/supabase.devbr/node_modules/libpg-query
npm error node-pre-gyp ERR! node -v v20.14.0
npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
npm error node-pre-gyp ERR! not ok

npm error A complete log of this run can be found in: /home/ymo/.npm/_logs/2024-05-30T02_45_33_126Z-debug-0.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants