Comments (3)
➤ PM Bot commented:
Jira ticket: RJS-2856
from realm-js.
Reproduction Steps
Make an app using Electron-React Boilerplate or Electron-Vite, try installing and using realm in it.
Please provide the exact steps you're taking to reproduce this, making it simpler for us to reproduce. For one thing, I would love to learn if its the bundling of the main or renderer process (or both) that throw this error.
from realm-js.
git clone —depth 1 —branch main https://github.com/electron-react-boilerplate/electron-react-boilerplate.git realmtest
cd realmtest
npm install
npm i realm@latest --legacy-peer-deps
- Replace code in src/renderer/App.tsx with the following (just importing realm and trying to create a new one)
import { MemoryRouter as Router, Routes, Route } from 'react-router-dom';
import icon from '../../assets/icon.svg';
import './App.css';
import { useEffect } from 'react';
import Realm from 'realm';
function Hello() {
useEffect(() => {
const realm = new Realm({
path: 'myrealm.realm',
});
console.log(realm.path);
}, []);
return (
<div>
<div className="Hello">
<img width="200" alt="icon" src={icon} />
</div>
</div>
);
}
export default function App() {
return (
<Router>
<Routes>
<Route path="/" element={<Hello />} />
</Routes>
</Router>
);
}
npm start
Output received is
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:1212/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.124:1212/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Users\mihir\realmtest\public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
[electronmon] waiting for a change to restart it
17:49:37.435 > Skip checkForUpdates because application is not packed and dev update config is not forced
17:49:37.444 > checkForUpdatesAndNotify called, downloadPromise is null
<i> [webpack-dev-middleware] wait until bundle finished: /index.html
ERROR in ./src/renderer/App.tsx 8:0-26
Module not found: Error: Package path . is not exported from package C:\Users\mihir\realmtest\node_modules\realm (see exports field in C:\Users\mihir\realmtest\node_modules\realm\package.json)
@ ./src/renderer/index.tsx 5:0-24 8:17-20
webpack compiled with 1 error
Not rewriting GET /index.html because the path includes a dot (.) character.
[26112:0703/174940.739:ERROR:CONSOLE(2)] "Electron sandboxed_renderer.bundle.js script failed to run", source: node:electron/js2c/sandbox_bundle (2)
[26112:0703/174940.739:ERROR:CONSOLE(2)] "TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))", source: node:electron/js2c/sandbox_bundle (2)
from realm-js.
Related Issues (20)
- Issue building for ARM/Linux HOT 4
- Inaccurate Return Type for `toJSON` Method in `RealmObject` HOT 2
- Zipped realm dependency is over 100MB HOT 2
- [Realm.Sync.Client.Network] Websocket Connection Fails with 308 Permanent Redirect Error HOT 21
- Upgrade to Realm Core v14.10.1 HOT 1
- RangeError: number is not integral, js engine: hermes (Vague) HOT 2
- mongodb realm sync App: log_in_with_credentials failed: 404 message: App not available in requested region: Client App ID=application-0-llfhjoe, App Location=US-VA ProviderRegion=aws-us-east-1, Server Location=IN-MB ProviderRegion=aws-ap-south-1 HOT 2
- libary instalation issue HOT 6
- after libary install facing below issue HOT 4
- Custom paths do not work when using sync HOT 1
- Data Loss in Nested Objects When Using Spread Operator for Update in Realm JS HOT 4
- Test helper waitForConnectionState is not doing anything HOT 1
- Provide defaults for `useUser()`'s generic type parameters HOT 2
- > I completely forgot I had opened this issue. I did manage to fix this back in the day but forgot to update... Back then I seemed to be the only one in the whole world with this problem :P HOT 4
- Generate SRI hash for our `realm-web` IIFE bundle HOT 1
- Revisit our workaround for flushing the microtask queue after calls from C++ into JS HOT 1
- RN event loop stuck when using realm with an expo development build HOT 9
- Refactor throwing uncaught exceptions from callbacks dispatched onto the event loop from C++ HOT 1
- Error: Realm at path *** already opened with a different schema mode in React Native HOT 4
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 realm-js.