web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PCF Component: Thirdpa...
Power Apps
Unanswered

PCF Component: Thirdparty Javascript library with typescript declaration files does not resolve correctly during runtime

(0) ShareShare
ReportReport
Posted on by 21

Hello!

I am working on a pcf component which relies on a third party JavaScript Library called webdav.client.
I have installed the package via npm and the package seems to have typescript support (including a type declaration file/"index.d.ts" with an exported namespace)

Even though, the type is resolved correctly within visual studio code, I get an error during runtime.
I have imported the Package via the usual typscript import keyword: 

 
import { ITHit } from 'webdav.client';
var webDavSession = new ITHit.WebDAV.Client.WebDavSession();
 
Like expected the types seem to be resolved correctly within the IDE.
During runtime, however, the library cannot be resolved, which leads to the error of WebDAV being undefined.
I assume that something gets lost during the transpilation-process, because the package can be resolved correctly when I remove the transpiled "webdav_client"-part and try to access the Library directly from the console (as can be seen in the attached screenshot).
TheTruePowerDev_0-1640959124923.png
I have tried severell ways to import this library, including the hacky way of downloading the actual code from git and importing the bundled javascript file directly:

import  * as ITHit from './externalLibraries/webdav.client';
ithitLibrary:any=ITHit;
session= this.ithitLibrary.WebDAV.Client.WebDavSession;
 
I also tried to manually reference the types by referencing the project via the "compilerOptions/typeRoots"-property of the tsconfig-file but that also didn't help.
Did any of you experience the same problem or knows how to fix this issue?
 
thank you!
 

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard