neon-bindings / neon-rs

The @neon-rs npm org, including the Neon CLI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack bundling issue

penberg opened this issue · comments

I am using the following template:

https://github.com/dherman/neon-prebuild-example

to package my library:

https://github.com/libsql/libsql-js

However, when I try to use the package in a Next.js, I get the following Webpack bundling error:

Module parse failed: Unexpected character ' ' (1:1)
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
> # `@libsql/darwin-arm64`
| 
| Prebuilt binary package for `libsql` on `darwin-arm64`.

Steps to reproduce:

  1. git clone https://github.com/penberg/nextjs-libsql-reproducer
  2. npm i && npm run dev
  3. Open http://localhost:3000

This turned out to be just Next.js maintaining a magic list of packages, not a neon-rs issue. For people hitting similar issue with their packages, this is what we did for libsql: vercel/next.js#55266