Failed npm install due to postinstall.js
Bug report
- [x ] I confirm this is a bug with Supabase, not with my own application.
- [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
I cannot do npm install nor npm ci
To Reproduce
- Go to project folder
- Run npm install @supabase/supabase-js
- See error
Expected behavior
Install runs smoothly
Screenshots
npm error code 1
npm error path /home/
npm error A complete log of this run can be found in: /home/
System information
- OS: Ubuntu
- Version of Node.js: v18.20.3
Additional context
Content of the log:
65 http fetch GET 200 https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.44.2.tgz 1969ms (cache miss)
66 info run @nestjs/[email protected] postinstall node_modules/@nestjs/core opencollective || exit 0
67 info run [email protected] postinstall node_modules/nestjs-pino node postinstall.js
68 info run [email protected] postinstall node_modules/supabase node scripts/postinstall.js
69 info run @nestjs/[email protected] postinstall { code: 0, signal: null }
70 info run [email protected] postinstall { code: 1, signal: null }
71 verbose stack Error: command failed
71 verbose stack at ChildProcess.
Hi, are you still experiencing this issue?
Also, the issue seems to come from installing supabase rather than @supabase/supabase-js (the latter has no postinstall script), so moving the issue there.
I'm experiencing the same issue with supabase cli package in dev dependencies. Search online didn't manage to find any useful solutions. But one finding I have is if I do sudo nom install --save-dev supabase@latest it will install successfully. But don't want to use sudo because it is not safe. But this does suggest it might be something related to postinstall.js script is trying to accessing some files that need a higher privilege?