0

Created a new VS Code project with a blank HTML file added a button to it (to activate a database request for this test)

Got a supabase account, created database/tables no problem, installed supabase through the terminal via:

npm install @supabase/supabase-js

No issues, a node_modules folder was created with a @supbase sub folder, so entered the code from the supabase website to connect to the database an this line:

import { createClient } from "@supabase/supabase-js";

Ran in FireFox VS Code debug console showed this message: Produces this error:

@supabase/supabase-js unable to resolve module specifier "@supabase/supabase-js/". Relative references must start with either "/", "./", or "../".

Modified the import to the folder location: import { createClient } from "./node_modules/@supabase/supabase-js";

Noticed NOTHING was happening, the button was unresponsive, no errors in the debug console, OR in the FireFox console..

Added an alert: import { createClient } from "./node_modules/@supabase/supabase-js"; alert("e");

This is also ignored..

Ran a debug client in Chrome, and its console report an error on line 1 (the import line):

server responded with a MIME type of "text/html"

import { createClient } from "./node_modules/@supabase/supabase-js/"; err_aborted 404 (not found)

Have tried this experiment now on two different computers one Windows one OSX and THE SAME ISSUE occurs the import line is not working

What step is missing from the supabase website to get the import line to work? Have uninstalled/installed supabase and nothing changes the supplied import command does work in any variation of the path - HEEELLLPPP!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.