Bug report
What is the current behavior?
I created a project using create-react-app and added the @ipr/n19factory dependency. When I try to start, it hits a runtime error referencing SiebelAppFacade:
ร
ReferenceError: SiebelAppFacade is not defined
push../node_modules/@ipr/n19factory/dist/index.js.parcelRequire.16D2../n19baseApplet
node_modules/@ipr/n19factory/dist/index.js:1561
1558 | }]), n;
1559 | }();
1560 |
1561 | exports.default = f, SiebelAppFacade.N19Helper = f;
| ^ 1562 | }, {
1563 | "./n19baseApplet": "52AF",
1564 | "./n19popupController": "wk9m"
If the current behavior is a bug, please provide the configuration and the steps to reproduce.
Create a react app with create-react-app, yarn add @ipr/n19factory. Try to use it in a js file and see the error. The index.js component I have been making is similar to the demo but I put the Physical Renderer as a View PR rather than applet.
So the beginning of my index.js file looks like this:
import n19Factory from "@ipr/n19factory";
import ReactDOM from "react-dom";
import React from "react";
import { MuiThemeProvider } from "@material-ui/core/styles";
import App from "./App";
import theme from "./style/theme";
const mountComponent = (id, viewName, appletNames) => {
// N19 initialization
//n19Factory(appletMap);
// Or initialize dinamically from PR
if(n19Factory){
n19Factory(appletNames);
n19Factory.viewName = viewName;
}
ReactDOM.render(
, document.getElementById(id));
};
What is the expected behavior?
A reference error to not be in the n19helper.
Possible fixes
If n19Helper had a check or someway to not throw the reference error. I understand adding n19helper to the SiebelAppFacade, it's just no project initially will like a reference error. It would be awesome if it could work with create-react-app initially so there is a choice to use the NexusBridge library directly instead of the exact demo setup.
// eslint-disable-next-line right before the SiebelAppFacade would be helpful. I think this would fix the runtime error?
Other relevant information:
Siebel version: 19.6
Happens in the dedicated client: N/A
Happens in the web client: N/A
Browser version: Latest Chrome
Nexus version (could be found inside compiled file): "@ipr/n19factory": "^0.8.0"
Defect reproduced in Demo Example: No, probably because of the ejecting create-react-app. I've been trying to find what tweak you made to make it stop having an error. We'd like to keep create-react-app instead of ejecting it just to get the project running.