no appropriate for new sequelize dialect postgres
Unanswered
Huyenlong posted this in #help-forum
Hi
i would connect my db sequelize when i do this :
the line newSequelize return this error :
POST /api/federation 500 in 1386ms
⨯ ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| <head>
Import trace for requested module:
./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
./node_modules/@mapbox/node-pre-gyp/lib/ sync ^./.*$
./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
./node_modules/odbc/lib/odbc.js
./node_modules/@sequelize/db2-ibmi/lib/connection-manager.js
./node_modules/@sequelize/db2-ibmi/lib/index.js
./node_modules/@sequelize/core/lib/sequelize.internals.js
./node_modules/@sequelize/core/lib/sequelize-typescript.js
./node_modules/@sequelize/core/lib/sequelize.js
./node_modules/@sequelize/core/lib/index.js
./node_modules/@sequelize/core/lib/index.mjs
./src/app/api/federation/route.ts
Someone know what i do bad ?
i would connect my db sequelize when i do this :
export const POST = async (req: Request, res: NextApiResponse) => {
const data = await req.json();
const sequelize = new Sequelize({ dialect: "postgres" });
await sequelize.authenticate();
return NextResponse.json("federation")
}the line newSequelize return this error :
POST /api/federation 500 in 1386ms
⨯ ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
<!doctype html>| <html>
| <head>
Import trace for requested module:
./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
./node_modules/@mapbox/node-pre-gyp/lib/ sync ^./.*$
./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
./node_modules/odbc/lib/odbc.js
./node_modules/@sequelize/db2-ibmi/lib/connection-manager.js
./node_modules/@sequelize/db2-ibmi/lib/index.js
./node_modules/@sequelize/core/lib/sequelize.internals.js
./node_modules/@sequelize/core/lib/sequelize-typescript.js
./node_modules/@sequelize/core/lib/sequelize.js
./node_modules/@sequelize/core/lib/index.js
./node_modules/@sequelize/core/lib/index.mjs
./src/app/api/federation/route.ts
Someone know what i do bad ?