ITHit / WebDAVAjax

WebDAV AJAX Library for opening docs from a web page and saving back directly to server in a SharePoint-like manner.
https://www.webdavsystem.com/ajax/
18 stars 9 forks source link

TypeError: Cannot set properties of undefined (setting 'ITHit') #5

Closed OlufNielsen closed 1 month ago

OlufNielsen commented 1 month ago

I installed the webdav.client via npm and am importing it like this:

import { ITHit } from "webdav.client";

this results with this error message in the console:

Uncaught TypeError: Cannot set properties of undefined (setting 'ITHit')
    at ITHitWebDAVClient.js:7:49
    at ITHitWebDAVClient.js:7:32

I used to pull the library in with a script tag, and that worked fine, but I am rewriting to TypeScript, so thought this would be a better way to do it. Am I missing some obvious configuration somewhere?

ITHitBuild commented 1 month ago

What tool are you using to build? Is it vite, webpack, any other? What is the tool version? Or just send your package.json.

OlufNielsen commented 1 month ago

I am using rollup

{ "scripts": { "build": "rollup --config rollup.config.mjs --watch" }, "dependencies": { "@floating-ui/dom": "^1.5.3", "datatables.net-dt": "^1.13.5", "interactjs": "^1.10.17", "jquery": "^3.7.0", "tslib": "^2.6.3", "webdav.client": "^5.21.5995" }, "devDependencies": { "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-terser": "^0.4.3", "@rollup/plugin-typescript": "^11.1.6", "postcss-minify": "^1.1.0", "rollup": "^3.25.1", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-external-globals": "^0.8.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-postcss": "^4.0.2", "typescript": "^5.5.3" } }

Leexy commented 1 month ago

Hello,

I've had the same issue since I migrated my vue-cli project to vite (5.3.3)

Any updates on the subject?

Thanks!

ITHitBuild commented 1 month ago

We have reproduced and fixed this issue. We will be publishing an update very soon.

ITHitBuild commented 1 month ago

This issue is fixed in version 5.21.6001.0 published on July 24, 2024.