This message was deleted.
# helpdesk
s
This message was deleted.
p
huh, that sounds like a bug!
useToken
has no business of importing the
tlds
package, which is only used for
chatMessageFormatter
• which version of components are you using? • does the error change between version 0.2.1 and 0.2.3? • what bundler/builder are you using?
b
I'm using components-react:
0.2.3
in a next.js
12
app.
p
thanks, are you using a nodejs version > 17.5 by chance?
b
yeah,
v19
This said, you are right, it is as soon as I use any of the components to create a room.. such as:
Copy code
import {
  useToken,
  LiveKitRoom,
  VideoConference,
} from "@livekit/components-react";
Not specific to
useToken
.
p
yup, this is connected to import assertions being required in nodejs v17.5 and above for JSON imports
I guess nodejs simply complains because the import exists in the file.
b
isn't the fix to only do something like:
Copy code
import tlds from 'tlds' assert {type: 'json'};
p
yeah, that’s the fix, I’m just trying to figure out if this breaks things with older node versions
b
Gotcha 🙂
Copy code
Node JS : v17.1.0, v16.14.0	
Add support for import assertions.
I feel this should be fine.
LiveKit is planning on supporting up to which older version?
p
it’s not set in stone, for components specifically we won’t strive to support versions that have reached EOL already, but v14 is still in maintenance mode, so if nothing speaks against that, that would be the earliest version we would strive to support
in some local tests things seem to work fine with v14 too though
🙌 1
b
Well, that's great news. Maybe they've backported support or its simply being ignored in earlier version since its only adding more context 🤷‍♂️
p
yeah not sure what, but opted to just not use JSON imports - just to be safe 😄 here’s the fix, we’ll have a high release cadence during our preview phase anyways so I’ll rollout a release in a bit!
🙌 1
b
Yeah I was following the PR 😉 Great work @polite-kilobyte-67570! And thanks a lot for the quick fix! Much appreciated.
❤️ 1
1
Ill keep an eye out for the new release, and I can let you know if everything works 🙂
p
great, thank you!
❤️ 1
b
This fixed it @polite-kilobyte-67570!
p
nice!
b
Thanks.