Skip to Content
0
Oct 17, 2020 at 01:21 PM

Cannot find module 'openui5' - sharepoint framework webpart

182 Views

Dear Team,

We are developing an application in sharepoint web part using Typescript. We are trying to use OpenUI5 library's datagrid(ui5-table) and ui5-input controls.

Since we are new to TS, Sharepoint and OpenUI5(v1.82.1), we are struggling in setup the working project.

We use VSCode as IDE and installed jquery and its types using npm. We tried installing npm packages like @openui5/sap.ui.core, @openui5/sap.m @openui5/sap.ui.table with types @openui5/ts-types & @sapui5/ts-types.

The library got resolved in VSCode and intellisense are working, but getting "Cannot find module 'openui5' " error at runtime if we use 'Import "openui5"' in ts file.

I also tried using the CDN library path using microsoft/sp-loader, but it is not loading the controls properly. import { SPComponentLoader } from '@microsoft/sp-loader'; SPComponentLoader.loadScript('https://openui5.hana.ondemand.com/1.82.1/resources/sap-ui-core.js');

Could you please help us to configure the working version of sharepoint workbench using VSCode, Typescript and OpenUI5?

Thanks in advance.