Open thorwebdev opened 4 weeks ago
Facing the same issue!
Same here
I found of that using next-transpile-modules
makes it work with this next.config.mjs
file
import withTM from "next-transpile-modules"
const withTranspileModules = withTM(["@electric-sql/pglite"])
export default withTranspileModules({})
But in my case I am using tailwind and it is breaking that. Looking for a solution.
I use Next.js 14 and alsopglite-react
and pglite-repl
.
I am able to fix the build error by adding these options to next-config.js
const nextConfig = {
swcMinify: false,
transpilePackages: [
'@electric-sql/pglite-react',
'@electric-sql/pglite-repl',
'@electric-sql/pglite',
],
}
Notes:
I must delete .next
folder before build or it will error again: rm -rf .next
If a similar error occurs, try removing the packages and add again
I'm running into an issue when trying to build this static nextjs page: https://github.com/thorwebdev/browser-vector-search
Have you seen this before?