You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an error, as mentioned in the title:
And in the console:
node_modules\mysql2\lib\connection_config.js (261:0) @
⨯ URL is not a constructor
Subsequently, I traced the path to connection_config.js and attempted to remove line number 10 and .next folder. It seems to have resolved the issue. Could you please explain if I have made any mistakes? Thank you.
The text was updated successfully, but these errors were encountered:
This is likely a similar issue to what others experience with LRU module ( #2001 and #1885 ) and probably some edge case between the bundler and commonjs. The issue itself is likely external to this module but I'm keen to find a solution that we can recommend to others.
Could you try to make a repro repo @VerredeTrop ? Ideally as small as possible, if the problem is manifested in just next + mysql2 as a dependency that would be ideal
@sidorares You were right! This is an issue linked to Lucia. I was trying to use it in the middleware of nextjs in the quest of seeking a good package that handle session.
Hello, first, I want to express gratitude for any assistance you can provide.
As Prisma isn't compatible with Edge, I aimed to directly integrate mysql2 adapter of lucia into my authentication file. Here's the code snippet:
I'm using Node.js 20 and Next.js 14 with the following dependencies:
I encountered an error, as mentioned in the title:
And in the console:
node_modules\mysql2\lib\connection_config.js (261:0) @
⨯ URL is not a constructor
Subsequently, I traced the path to connection_config.js and attempted to remove line number 10 and .next folder. It seems to have resolved the issue. Could you please explain if I have made any mistakes? Thank you.
The text was updated successfully, but these errors were encountered: