Hi Ben,
Oh sorry its my mistake. Actually i created another duplicate project "ABNVerification" to do some R&D at my end for fixing this issue.
So i might have shared npm start output of another duplication project. But i can share npm start output of original project too "ABNVerifys" but i checked that too and its output is same too.
So i think namespace issue is not there.
you mentioned that i might be missing import in index.ts file. Let me explain my file hierarchy so that you might get some idea about files.
There are three files in my PCF Control project.
a) index.ts
b) ABNControl.tsx
c) ABNModal.tsx
Obviously index.ts file is first one to start with. Index.ts file import my ABNControl.tsx file and then ABNControl.tsx file import third file i.e "ABNModal.tsx"
Second file is having one textbox and one button . On click on this button , it will invoke my third file . Third file is basically React Modal component which will open a pop up window and show some more details.
I did some hit and trial methods at my end to solve this issue and found that invoking constructor issue is coming due to third file only. Becuz when i remove third file from my PCF Control and deploy it on Dynamics 365. Then this error does not come But if i include third file then this error comes in Dynamics 365 .
So i think there is something wrong while invoking third file from second file. Which i am not able to figure it out.
Below is my piece of code in second file which invokes third file
<MyModal inputABN = {this.state.inputValue}/>
Below is Third file which is basically Modal component and its constructor code
export interface IModalProps {
inputABN?: string;
onInputChanged?:(newValue:string)=>void;
};
export interface IModalState extends React.ComponentState,IModalProps{}
ReactModal.setAppElement('#app-root');
export class MyModal extends React.Component<IModalProps, IModalState> {
constructor (props: IModalProps) {
super(props);
this.state = {
showModal: false , inputABN: props.inputABN
};
this.handleOpenModal = this.handleOpenModal.bind(this);
this.handleCloseModal = this.handleCloseModal.bind(this);
}
.....................................................
Can you point out what i am doing wrong.
Thanks