Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No identifiers allowed directly after numeric literal #6194

Closed
snibo13 opened this issue Oct 11, 2023 · 8 comments · Fixed by #6289
Closed

No identifiers allowed directly after numeric literal #6194

snibo13 opened this issue Oct 11, 2023 · 8 comments · Fixed by #6289
Assignees

Comments

@snibo13
Copy link

snibo13 commented Oct 11, 2023

How frequently does the bug occur?

  • select --

Description

Whenever I attempt to use useQuery from '@realm/react'. (VS Code also seems to have trouble finding this module). I can import it without any immediate issues but when I try to useQuery to retrieve values I get "No identifiers allowed directly after numeric literal"

Stacktrace & log output

When I run this using expo, I get "no stack track" written in the log

Can you reproduce the bug?

  • select --

Reproduction Steps

Install realm/react
import useQuery from '@realm/react'
Create and render a React app with any content that has a constant equal to useQuery()

Minimal reproduction:

import React, { useEffect, useState } from 'react';
import { ScrollView, View, Text, TextInput, Button } from 'react-native';
import { ListItem } from 'react-native-elements';
import { StyleSheet } from "react-native";
import { useQuery } from '@realm/react'
import { createRealmContext } from '@realm/react';
import Realm, { ObjectSchema } from 'realm';
export default function App() {

  const data = useQuery();
  return (
    <View>
      <Text>hello</Text>
    </View>);

}

My code: here

Version

0.4.1 and 0.4.3

What services are you using?

  • select --

Are you using encryption?

  • select --

Platform OS and version(s)

React Native on Android 14, development on Windows 11

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@elle-j
Copy link
Contributor

elle-j commented Oct 11, 2023

Hi @snibo13, from your package.json I can see you're using "realm": "^12.2.1" and "@realm/react": "^0.4.3". For v12.2.1 you will need to upgrade realm/react to at least 0.5.0 (e.g. our latest "@realm/react": "^0.6.1"). (You can refer to our compatibility matrix.)

For using realm and realm/react in your application, please see our docs and guides or example apps. We recommend using realm/react's AppProvider, UserProvider, and RealmProvider, rather than createRealmContext.

@elle-j
Copy link
Contributor

elle-j commented Oct 16, 2023

@snibo13, I'll go ahead and close this issue, feel free to reopen should your problem still exist.

@sync-by-unito sync-by-unito bot closed this as completed Oct 16, 2023
@ravindraguptacapgemini
Copy link

ravindraguptacapgemini commented Oct 23, 2023

@elle-j is it required to use @realm/react with realm version 12.2.1, because I am only working with realm till now?
Earlier I was using realm: 12.0.0-rc.3, once I switched to latest version, I started to see the error for android, let me know if there is any quick fix for this.

@elle-j
Copy link
Contributor

elle-j commented Oct 23, 2023

No, version 12.2.1 is not a requirement. But to use v12 and up, in combination with @realm/react, you'd need to use at least @realm/react v0.5.0. To see what enhancements and bugfixes each new version has added you can refer to our Releases, if you decide to use a lower version than the latest.

@ravindraguptacapgemini
Copy link

@elle-j I am getting this error with 12.2.1 without using @realm/react. How to fix this issue with realm standalone?

@takameyer
Copy link
Contributor

We have noticed that this issue occurs when hermes is disabled on Android. I'll open this back up so we can track and report progress.

@takameyer takameyer reopened this Nov 22, 2023
@kraenhansen
Copy link
Member

For future reference, the reason this is experienced only on Android might be, that on iOS the app will use the JSC which is provided by the operating system, whereas on Android it ships with a specific version provided by the React Native project. This could relate to a difference in the support for these numeric separators across different versions of JSC.

@kneth
Copy link
Contributor

kneth commented Nov 29, 2023

@snibo13 I believe we have a fix in #6289.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants