'typeErrror : Cannot read properties of undefined (reading 'RCP_WEB') from module dependency

I have created repo with some ts files which is having some methods and generated private registry for that repo. And installed & imported that as module dependency in my project (npm install modulename). I could able to navigate/access methods from code.

import { AppName, getHotMenu, Language } from 'moduleName';

const webContent = getHotMenu({ features: this._appSession.metaData.features, appName: AppName.RCP_WEB, language: Language.ENGLISH});

But after compilation, i could not able to access anything from that module, so getting

Cannot read properties of undefined (reading 'RCP_WEB')



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source