webdav-client: Uncaught TypeError: deepmerge is not a function

Recently, I was trying to use this library to connect to an owncloud instance. But, this doesn’t seem to work. I am getting the following error:

Uncaught TypeError: deepmerge is not a function
    at Object.getDirectoryContents (factory.js?879e:118)
    at Object.eval (main.js?1c90:40)
    at eval (80:45)
    at Object.<anonymous> (app.js:1240)
    at __webpack_require__ (app.js:679)
    at fn (app.js:89)
    at Object.<anonymous> (app.js:1104)
    at __webpack_require__ (app.js:679)
    at app.js:725
    at app.js:728

I did npm install deepmerge. But, it didn’t help. @perry-mitchell?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Thanks @royalharsh - Unfortunately I wasn’t able to build the project due to several eslint errors, but I also couldn’t see any issues with what you’ve set up. It may be that deepmerge cannot be resolved in node_modules. I would recommend not having it in your package.json at all, as you don’t use it, it should be installed by webdav and used by it when needed. If your built copy doesn’t resolve deepmerge, it’s most likely a webpack configuration issue. I’ll be updating it in my webpack projects soon and I’ll report back if I find something.

That being said, I’ll most likely have to close this issue (after I’ve checked of course), as webpack is not the primary target for this library. It’s built for node and I don’t particularly want to have to support webpack officially as every webpack config is different.

There’s nothing special about the deepmerge dependency in this library, so it should be resolved as expected.