Skip to content

fix: web build issue - #63

Open
SrirangK wants to merge 4 commits into
mainfrom
moo/MOO-2401/add-mendix-native-dependency-main
Open

fix: web build issue#63
SrirangK wants to merge 4 commits into
mainfrom
moo/MOO-2401/add-mendix-native-dependency-main

Conversation

@SrirangK

Copy link
Copy Markdown

No description provided.

import type { TurboModule, CodegenTypes } from 'react-native';

const TurboModuleRegistry =
require('react-native/Libraries/TurboModule/TurboModuleRegistry') as {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default

Comment thread src/firebase-messaging/index.ts Outdated
@@ -0,0 +1,18 @@
import { getNativeModule } from '../native-modules';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firebase is not part of mendix-native, so I don't think this code belongs here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the others were done to make call sites clean and type safe but I was not aware of its after effects. Let me try moving this to native widgets itself if that fits

Comment thread src/image-picker/index.ts Outdated
showImagePicker?: unknown;
}

export const ImagePickerManager = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImagePicker is not part of mendix-native, so I don't think this code belongs here.

Comment thread package.json Outdated
},
"peerDependencies": {
"@op-engineering/op-sqlite": "*",
"@op-engineering/op-sqlite": "15.2.5",

@YogendraShelke YogendraShelke Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not lock the version here. It should be the host application's (make-it-native/native-template/appdev-client) responsibility to provide the correct version of op-sqlite.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should definitely update this in example/package.json though.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason even thought Native template pins it to same version mendix native was showing the newer verison in package-lock which lead to crashes while building the app. So I pinned it to the same version as in the native template

Comment thread package.json Outdated
"types": "./lib/typescript/src/firebase-messaging/index.d.ts",
"default": "./lib/module/firebase-messaging/index.js"
},
"./schedule-exact-alarm": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we routing all these third-party libraries through mendix-native? Upgrading mendix-native in a host application comes at the cost of bumping the nativeBinaryVersion whenever there is a JavaScript-level change, since it is also consumed by the AppDev client. This, in turn, creates a dependency on Studio Pro releases, which then require a corresponding nativeBinaryVersion bump. Each bump reduces the OTA compatibility window. As a result, even upgrades to unrelated third-party dependencies can end up requiring a binary version upgrade, adding unnecessary maintenance overhead for host applications.

@YogendraShelke YogendraShelke Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If routing these packages through a JavaScript proxy is the only viable solution, then that proxy should live in the native-widgets repository rather than in mendix-native, to avoid unnecessary impact on make-it-native, native-template, and appdev-client.

Comment thread src/notifee/index.ts Outdated
@@ -0,0 +1,7 @@
import { getNativeModule } from '../native-modules';

export const NotifeeApiModule = {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notifee is not part of mendix-native, so I don't think this code belongs here.

Comment thread src/schedule-exact-alarm/index.ts Outdated
@@ -0,0 +1,14 @@
import { getNativeModule } from '../native-modules';

interface ScheduleEASpec {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alarm is not part of mendix-native, so I don't think this code belongs here.

Comment thread src/file-system/NativeMxFileSystem.ts Outdated
import type { TurboModule, CodegenTypes } from 'react-native';

const TurboModuleRegistry =
require('react-native/Libraries/TurboModule/TurboModuleRegistry') as {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default

Comment thread src/native-modules/index.ts Outdated
@@ -0,0 +1,8 @@
const TurboModuleRegistry =
require('react-native/Libraries/TurboModule/TurboModuleRegistry') as {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the main branch, I recommend avoiding deep imports altogether, as they were deprecated in React Native v0.80 and are no longer supported in v0.87.
https://reactnative.dev/blog/2026/08/11/react-native-0.87#strict-typescript-api-by-default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants