tentwentyfour / nextcloud-link

Javascript/Typescript client that communicates with Nextcloud's WebDAV and OCS APIs
MIT License
56 stars 7 forks source link

Error / warning message thrown on npm install #38

Closed maximelafarie closed 2 years ago

maximelafarie commented 2 years ago

I'm using nextcloud-link in my Typescript NodeJS project. When I'm running an npm i command, I've got the following error / warning message:

15:09:38 - File change detected. Starting incremental compilation...
[start:build]
[start:build] node_modules/webdav-client/lib/request.d.ts(2,22): error TS7016: Could not find a declaration file for module 'request'. '[...]/node_modules/request/index.js' implicitly has an 'any' type.
[start:build]   Try `npm i --save-dev @types/request` if it exists or add a new declaration (.d.ts) file containing `declare module 'request';`
[start:build]
[start:build] 15:09:38 - Found 1 error. Watching for file changes.

I don't know if it's on your side (maybe it's more on the webdav-client's one) but it doesn't seem to me to be a big deal.

Thank you very much for this library, it literally saved my day! 🙏

Regards! 🖖

kwisatz commented 2 years ago

Hi @maximelafarie

Glad to read that, in general, you're happy with the library. The request problem has been looming over our heads for a while. It's been deprecated in nodejs itself, yet webdav-client hasn't been updated to replace it. We've pondered for a while whether to replace webdav-client entirely with a different implementation or one of our own, see #26, but we've had a lot of other stuff on our minds as of late and we still didn't get to it.

I think we'll most likely soon run into the same problem or worse but we're aiming to solve this issue before then.

maximelafarie commented 2 years ago

Awesome! Wish you the best with that! Again, thank you for your work and feel free to ask for contribution if needed! Cheers! 🖖

maximelafarie commented 2 years ago

FYI, installing npm i --save-dev @types/request seems to remove the warning message, so it's a little workaround for the moment.