Hey all !! Please let me know if any body face thi...
# suitecommerce
h
Hey all !! Please let me know if any body face this type of error on creating custom module through page component const pageType = application.getComponent('PageType'); Error :
TypeError: Cannot read property 'registerPageType' of null
at Object.mountToApp (MyCustomModule.ts:51)
at ApplicationSkeleton.ts:105
at Function._.each._.forEach (underscore.js:186)
at ApplicationSkeleton.start (ApplicationSkeleton.ts:102)
at startShopping (SC.Shopping.Starter.ts:45)
at Array.<anonymous> (SC.Shopping.Starter.ts:100)
at mightThrow (jquery.custom.js:4456)
at process (jquery.custom.js:4534)
s
Well, this is a standard JavaScript error.
application
does not exist in the scope where you've called it. So where are you calling it? And I wouldn't use any syntax newer than ES5, btw.
h
@Steve Goldberg Thanks the Issue was resolved !! its due to my custom module was loaded in distro.js before PageType module 🙂