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
Hi everyone I'm developing apps with nextjs but I have a connection problem. How can i solve this issue?
//api/dbCheck
import { Connection, Database } from "duckdb-async";
import path from "path";
export async function GET() {
const dbPath = path.join(process.cwd(), "duckdb.db");
console.log(dbPath);
async function simpleTest() {
const db = await Database.create(dbPath);
console.log(db.connect());
}
simpleTest();
return Response.json({ message: "Hello, Next.js!" });
}
⨯ ./node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:1
Module not found: Can't resolve 'mock-aws-s3'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
./node_modules/duckdb/lib/duckdb-binding.js
./node_modules/duckdb/lib/duckdb.js
./node_modules/duckdb-async/dist/duckdb-async.js
./src/app/api/dbCheck/route.ts
GET /api/dbCheck 500 in 34ms
I'm using Cesium so I dont want config webpack. If I dont config webpack, occured this error at below.
./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/duckdb/lib/duckdb-binding.js
./node_modules/duckdb/lib/duckdb.js
./node_modules/duckdb-async/dist/duckdb-async.js
./src/app/api/dbCheck/route.ts
GET /_next/static/webpack/87abe03ae6e53aae.webpack.hot-update.json 500 in 4143ms
The text was updated successfully, but these errors were encountered:
Hi everyone I'm developing apps with nextjs but I have a connection problem. How can i solve this issue?
I'm using Cesium so I dont want config webpack. If I dont config webpack, occured this error at below.
The text was updated successfully, but these errors were encountered: