electric-sql / electric-sql/pglite

Invalid FS bundle size

Open
#409 14 comments 0 reactions 0 assignees View on GitHub
bundlers-nextjs/emsdk
Dominant language
TypeScript
Stars
16k
Forks
442
Avg merge
20h 19m
Merged PRs (30d)
7

Description

HI everyone,
I'm trying to use electric-sql without the need of using cdn and I got this error while I'm loading the db:
```
Uncaught (in promise) Error: Invalid FS bundle size: 792 !== 2987805
at Object.getPreloadedPackage (electric-sql-bundle.js:11787:39)
at loadPackage (electric-sql-bundle.js:2021:84)
at electric-sql-bundle.js:2133:7
at electric-sql-bundle.js:2134:7
at te3.Pe2 (electric-sql-bundle.js:11821:57)
```

I'm using a bundled version (electric-sql-bundle.js) created with esbuild

this is the code of the esbuild
const esbuild = require('esbuild');

```
esbuild.build({
target: 'esnext',
bundle: true,
splitting : false,
format: 'esm',
entryPoints: [
'./node_modules/@electric-sql/pglite/dist/index.js',
],
outfile: './dist/electric-sql-bundle.js',
define: {
'process.env.NODE_ENV': JSON.stringify('development'),
},
external: ['@electric-sql/pglite'],
}).catch(() => process.exit(1));
```

Probably i did something wrong but i dont find any kind of documentation related to this.

If I did something wrong in the bug report im sorry

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.