Skip to content

Having problems trying to use duckdb-async in Next.js #6

@Kennyac

Description

@Kennyac

When running on next.js I recieve the following error

  • error ./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>
|
|

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/duckdb/route.ts


I have a simple example project showing the problem
https://drive.google.com/file/d/1dceXEXiaH01-SJKxu2ckgoWCTf8f79Rm/view?usp=sharing

unzip form the above link
to reproduce
yarn install
yarn dev
browse to http://localhost:3001/api/duckdb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions