Next.js Discord

Discord Forum

mysql2 package not working on Nextjs 14

Unanswered
Peruvian anchoveta posted this in #help-forum
Open in Discord
Peruvian anchovetaOP
Error with mysql2 package using sequelize in nextjs 14. I have my model defined and import my index db but it throws this error.

8 Replies

Peruvian anchovetaOP
sorry meant to update post, I already figured out what was happening. Now Im having issues with importing my "db" from the index file it created on my server action
it has an issue with path
when I submit
nothing done aside from importing the db
this happens when I submit my form and it goes to a server action where I want to save the data to mysql, I then Import the db from the models folder and it throws this error.
Peruvian anchovetaOP
all Im trying to do is create an entry via sequelize from a form via server actions but creating the entry is what throws the error. like just importing the index db connection
Peruvian anchovetaOP
is there a bug with the index file it creates?