Closed mv-debug closed 1 year ago
I have to use:
import { createClient } from "webdav/web";
To avoid using node-fetch. :)
Glad you found the solution. This could be better improved using the exports definition in ESM.. something to consider for the next stable version.
Hi all,
I use this module and it connects with my webdav server (Nextcloud 24) but if I put a file to the server via
const resp = await client.putFileContents("file.txt", "just a test", { overwrite: false });
I got this error:
_browser-external:stream:3 Uncaught (in promise) Error: Module "stream" has been externalized for browser compatibility and cannot be accessed in client code. at Object.get (browser-external:stream:3:11) at putFileContents.js:65:118 at step (putFileContents.js:33:23) at Object.next (putFileContents.js:14:53) at putFileContents.js:8:71 at new Promise ()
at awaiter (putFileContents.js:4:12)
at putFileContents (putFileContents.js:54:12)
at Object.putFileContents (factory.js:76:92)
at Proxy.save_to_nc (App.vue:86:33)
get @ browser-external:stream:3
(anonymous) @ putFileContents.js:65
step @ putFileContents.js:33
(anonymous) @ putFileContents.js:14
(anonymous) @ putFileContents.js:8
awaiter @ putFileContents.js:4
putFileContents @ putFileContents.js:54
putFileContents @ factory.js:76
save_tonc @ App.vue:86
Promise.catch (async)
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:168
invoker @ runtime-dom.esm-bundler.js:345
Here is my package.json
Thank you in advance.
It will be great if anybody could help me.
Best
Michael