Closed JPVRS closed 1 year ago
Can you try running npx supabase --version
and see if your machine prompts to install that way?
Also, could you share with us the contents of package.json
that you have initialised?
Can you try running npx supabase --version and see if your machine prompts to install that way?
No luck, unfortunately.
$ npx supabase --version
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
at new NodeError (internal/errors.js:322:7)
at validateString (internal/validators.js:124:11)
at Object.basename (path.js:1281:5)
at parsePackageJson (file:///home/codespace/.npm/_npx/9064/lib/node_modules/supabase/scripts/preinstall.js:62:22)
at async main (file:///home/codespace/.npm/_npx/9064/lib/node_modules/supabase/scripts/preinstall.js:88:16)
at async file:///home/codespace/.npm/_npx/9064/lib/node_modules/supabase/scripts/preinstall.js:115:1 {
code: 'ERR_INVALID_ARG_TYPE'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! supabase@1.17.0 preinstall: `node scripts/preinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the supabase@1.17.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/codespace/.npm/_logs/2022-11-30T23_24_35_276Z-debug.log
Install for [ 'supabase@latest' ] failed with code 1
Also, could you share with us the contents of
package.json
that you have initialised?
Attached package.json.txt package-lock.json.txt yarn.lock.txt
@JPVRS you might have a corrupted supabase
module in your local npm. Could you check the contents of the following files:
cat /workspaces/nextjs-stripe-supabase/node_modules/supabase/package.json
cat /home/codespace/.npm/_npx/9064/lib/node_modules/supabase/package.json
Both of them should contain the line "bin": "bin/supabase",
Last resort is to delete your node_modules
directory and try npm i supabase --save-dev
again.
Let me know if it works.
I "resolved" this by setting up the environment on my local machine instead of using Github Codespaces (which is unfortunate because other than this issue, Codespaces was working great for me).
I'm following along with the instructions in the Readme, and the Supabase CLI installation isn't working. This is the output I'm getting: