Can anyone tell me from where to import renderToSt...
# javascript
c
Can anyone tell me from where to import renderToSting?
g
Not sure if you are asking a general question on a library you are using or if that is part of Supabase somewhere.
j
Hey Chirag, it looks like you are using
next-mdx-remote
. Not sure where you got this code reference from, but
renderToString
is no longer available in
next-mdx-remote
since version
3.0.0
. It has been replaced by
serialize
. So you either need to use the new
serialize
method, or downgrade
next-mdx-remote
to 2.1.4. You can confirm this in the Major Changes section of this document. https://github.com/hashicorp/next-mdx-remote/releases/tag/3.0.0
c
part of supabase
g
Can you give more info on what you are doing when you get this? Not sure what part of Supabase this could be.
OK I do find it is used in the Supabase www app (their website), but it is set in package.json to not use major version change from 2.1.3, so should not be using 3.0.0. https://github.com/supabase/supabase/blob/4167a51ccd43314f4dea3dc6688f2a7e27d2f102/apps/www/package.json#L29 What are doing when you get this?
c
I was just getting started and when I did
Copy code
npm run start
I got these errors
actually I did ``npm run build``
please help me getting started I want to contribute
g
Getting started with what? Are you trying to work on the main Supabase repository which is their website, docs and some examples? It has nothing to do with using Supabase. If you are trying to work on the main repository for a PR, then you probably should post an issue there as SB devs are more likely to see it.
c
I am trying to work with main supabase repository
www
I want to contribute to it
g
Did you follow the specific instructions for www https://github.com/supabase/supabase/tree/master/apps/www ? My guess is there is some new work going on in apps/temp_docs that uses version 3 of the code discussed above and that is causing a conflict for you.
j
So is your question more about types?
So in that file it's being imported from
import renderToString from 'next-mdx-remote/render-to-string'
g
@jensen it is also imported in temp_docs with the 3.x.x version, I'm wondering if the way he is using npm on the repository is pulling in temp-docs also and causing a conflict.
j
Ah I see. Yeah temp_docs has upgrade to 3
but temp_docs doesn't use
renderToString
it uses the new
serialize
instead.
Maybe we can see the actual error
Above it says "I got these errors" and then no indication of what the errors were
g
Yes. But I think you are supposed to work on www separately from docs. If they are working at the root level, maybe it is pulling in the 3.x.x version only.
j
Not sure where the commands are being run.
g
I've only worked on PR's for docs so not sure for www other than seeing the process I linked them to.
j
Looks like the right instructions
I guess we can wait for @Chirag to let us know whether they ran those commands in the www package or somewhere else.
c
I ran it in www package
j
@Chirag we use turbo repo now, if you go to root of the repo, run
npm i
then
npm run dev
you might need to delete all the package-lock.json files and node_modules directories in the apps though first
c
what is a turbo repo @jonny
I am attempting to fix this bug https://github.com/supabase/supabase/issues/6768 Where I can find the source code for this page
directory to this code