Comments (6)
Please reopen if still broken in the latest version.
from rxdb.
I'm not trying to rule out an issue here, but as a data point I'm using the WebRTC replication with vite as a build tool without problems. Currently using rxdb 15.6.0 and vite 5.2.2
from rxdb.
Seems to come from RxDB and not from simple-peer. Can you enable source maps?
from rxdb.
I'm not trying to rule out an issue here, but as a data point I'm using the WebRTC replication with vite as a build tool without problems. Currently using rxdb 15.6.0 and vite 5.2.2
I tried to reproduce this problem in a new project ("vite": "^5.2.6", "rxdb": "^15.16.0").
https://www.npmjs.com/package/readable-stream#usage-in-browsers
In the readable-stream introduction, "Polyfills are no longer required since version 4.2.0."
The version used in simple-peer is ^3.6.0 (https://github.com/feross/simple-peer/blob/f1a492d1999ce727fa87193ebdea20ac89c1fc6d/package.json#L20)
My thoughts: The problem may be caused by vite not configuring polyfill by default or using the wrong polyfill when building the simple-peer, and there is a problem when building (warning in the console). If we use simplepeer-min.js directly, which is a built product with polyfill inside, we don't have this problem.
On the whole,
Cause of the problem:
Some modules used in "simple-peer" lack corresponding polyfill or have problems with polyfill when vite is built. Causing vite to issue a warning.
Problem solution:
- The polyfill of the vite configuration module, such as readable-stream, etc. (What if I used a different build tool?)
- Directly use simplepeer-min.js with polyfill. (https://github.com/feross/simple-peer/blob/f1a492d1999ce727fa87193ebdea20ac89c1fc6d/package.json#L63)
from rxdb.
Seems to come from RxDB and not from simple-peer. Can you enable source maps?
I think it's a matter of polyfill when building, you can try this: https://stackblitz.com/edit/vitejs-rxdb-replication-webrtc?file=src%2Fdb%2Fplugins%2Freplication-webrtc%2Fconnection-handler-simple-peer.ts
from rxdb.
I merged your PR, release will come in the next days.
from rxdb.
Related Issues (20)
- Explain the benefits of DB and add a benchmark HOT 13
- Attachment replication with Firebase Storage HOT 3
- attachments missing field data replication failed HOT 2
- WebRTC Replication plugin should pass an RTCPeerConnection configuration to simple-peer HOT 3
- Followup: RxDB "Cannot open database state with newer RxDB version" error when trying to update from v13 to v15 HOT 8
- Checkpoint iteration strategy failing in simultaneous pull-push scenario. HOT 3
- Malformed Revision HOT 1
- rxdb-server incorrectly replies with the `updatedAt` instead of `lwt` property - rendering the client unable to sync properly HOT 1
- rxdb-server parses `lwt` property to an integer - creating an infinite synchronization-loop HOT 1
- RxDb 15.17 and TypeScript Error HOT 4
- Issue initialising rxdb with seed data HOT 3
- replicateWithWebsocketServer prints endless connection errors although state is canceled HOT 4
- createRxDatabase(): A RxDatabase with the same name and adapter already exists. HOT 4
- When replicationWebrtc is used, each collection replication creates a websocket connection and several peers HOT 1
- Replication error behind Nginx HOT 3
- getRxStorageLoki deprecated, what could replace it? HOT 1
- Facing IO error: lock: "Resource temporarily unavailable" HOT 1
- GraphQL Replication error missing information HOT 4
- GraphQL query builder functions do not generate output fields for nested queries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxdb.