
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mashup in React Native - error in requirejs
Hi all.
I created a react native app to test if it is possible to create a mashup in a mobile but I'm having troubles in loading the require.js file.
I'm getting the following error:
ERROR TypeError: Cannot read property 'documentMode' of undefined, js engine: hermes
This is an example of what I currently have:
const config = {
host: "myHost.com",
prefix: "/",
port: 443,
isSecure: true,
virtualProxy: "myVirtualProxy",
};
const baseUrl = `https://${config.host}:${config.port}/${config.virtualProxy}/resources`;
require.config({
baseUrl: baseUrl
});
require(["js/qlik"], (qlik) => {
qlik.on("error", (error) => console.error(error));
});
Is this correct or should I be doing it differently to surpass the issue?
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SVAS it doesn't lool like an error from require.js. Please check:
- Did you inject require.js script in your app (from html or from JS)?
- Did you check if require.js is correctly loaded in developer tool network tab?
For a quick test, if you are using Qlik Sense enterprise, go to dev-hub and create a sample mashup, then you can inspect the code for checking if everything is setup correctly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @alex_colombo .
Thank you for your reply.
Yes, I am currently injecting the require.js script on my app.
I have created before an Angular mashup and my code works well on there, but the same doesn't happen with this new app in React Native for mobile. We are trying to create a mobile app but we are struggling to surpass this issue.
Do you know if exists any documentation about mashups in mobiles?
Thanks in advance for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@SVAS there is no docs on mashup for mobile, mashup is a mashup, it's up to developers to make it responsive for mobile.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@alex_colombo I understand what you are saying but I'm not sure if you understood my question. I'm not trying to build a mashup that needs to be responsive in the browser or in a mobile. what i'm trying to do is to build a mobile App, like Whatsapp, using React Native and integrate with qlik like we do in a mashup.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@SVAS very sorry, I read React so my mind go straight to React JS. About React native, I don't know about any docs on this. What I can suggest is to check all the below steps:
- Check if require.js is injected properly
- Check if websocket connection is established between your app and Qlik engine
- Check if you are correctly authenticated looking at websocket messages
Capability APIs and require.js use AngularJS, can React Native run this?
I suggest to try to use nebula.js instead.
