ERROR: Please install mysql2 package manually

created at 07-06-2021 views: 1

description

error message:

ERROR: Please install mysql2 package manually

When this problem occurs when installing and using sequelize.

you can:

1. The mysql2 package may not be installed

Solution: yarn add mysql2

2. It may not be recognized by webpack

Solution: yarn add webpack-node-externals
Add in webpack.config.js

const nodeExternals = require('webpack-node-externals')
module.exports = { 
...
  externals: [nodeExternals()]
}
Please log in to leave a comment.