Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Hi @SVAS it doesn't lool like an error from require.js. Please check:
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.
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.
@SVAS there is no docs on mashup for mobile, mashup is a mashup, it's up to developers to make it responsive for mobile.
@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.
@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:
Capability APIs and require.js use AngularJS, can React Native run this?
I suggest to try to use nebula.js instead.