zid
zid7mo ago

Runtime broken, out of nowhere i'm getting a build error from running convex.dev

The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

✘ [ERROR] The JSX syntax extension is not currently enabled
The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.

✘ [ERROR] The JSX syntax extension is not currently enabled
Please assist
12 Replies
ballingt
ballingt7mo ago
What's the command you're running? Does the error message say what file this is happening on? This looks like an error you'd get if you used JSX syntax in a .js or .ts file.
zid
zidOP7mo ago
npx convex dev yes it outputs a number of files however, there was no problem about an hr ago
✘ [ERROR] The JSX syntax extension is not currently enabled

components/ElementalAvatar/ElementalIcon.js:7:4:
7 │ <Container width={width}>
╵ ^

The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.
⠹ Preparing Convex functions...
✘ [ERROR] The JSX syntax extension is not currently enabled

components/Equips/Mana/Andromeda/index.js:125:4:
125 │ <ParticlesContainer
✘ [ERROR] The JSX syntax extension is not currently enabled

components/ElementalAvatar/ElementalIcon.js:7:4:
7 │ <Container width={width}>
╵ ^

The esbuild loader for this file is currently set to "js" but it must be set to "jsx" to be able
to parse JSX syntax. You can use "loader: { '.js': 'jsx' }" to do that.
⠹ Preparing Convex functions...
✘ [ERROR] The JSX syntax extension is not currently enabled

components/Equips/Mana/Andromeda/index.js:125:4:
125 │ <ParticlesContainer
ballingt
ballingt7mo ago
Ah looks like it's that one So it looks like you need to figure out why this file is being imported by a file in your convex/ directory.
zid
zidOP7mo ago
wait a minute.... omgosh. i honestly dont know how that got in there. THANK GOODness its just a stupid mistake by me
ballingt
ballingt7mo ago
for me it's usually an autoimport added by vscode
zid
zidOP7mo ago
yes, i think thats it
ballingt
ballingt7mo ago
importing something from the wrong file
zid
zidOP7mo ago
i'll have to recognize this better next time i was pretty confused, i also got an error regarding punycode deprecation at the same time and tried to see how these might be related lol thank you Tom!!
ballingt
ballingt7mo ago
ugh we need to fix that punycode thing, it's just a warning but it's distracting. It's deep in transitive dependencies somewhere, I'll take a look what version of Node.js are you using? node -v it takes specific versions of Node.js to repro it and specific dependencies not so I can tell you to upgrade, but so I can download that version to repro the punycode thing
zid
zidOP7mo ago
im now using v20.14.0, i think i was at v21 before? just a guess seems like the punycode eror is gone on the version im on currently. lets see here.. i mightve been on v22.2.0
ballingt
ballingt7mo ago
cool, just if you had it handy I haven't dug in yet but haven't nailed down when it occurs
zid
zidOP7mo ago
thanks a bunch!

Did you find this page helpful?