TehShrike / deepmerge

A library for deep (recursive) merging of Javascript objects
MIT License
2.75k stars 216 forks source link

is-mergeable-object is a devDependency #230

Closed lionel87 closed 3 years ago

lionel87 commented 3 years ago

When I try to require your package I get an Error: Cannot find module 'is-mergeable-object' message.\ Is there any reason the is-mergeable-object package is included in the dev dependencies in your package.json?

lionel87 commented 3 years ago

found my mistake. my bad, sorry. it should be a dev-dep as it is. my configuration tricked me.

ruscon commented 3 years ago

have the same issue

❯ node -v
v14.15.5

❯ npm -v
6.14.11
TehShrike commented 3 years ago

The only way that should happen is if your build step is messing up and including ./index.js instead of respecting the main entry point in the package.json:

https://github.com/TehShrike/deepmerge/blob/7640d50c9d9dcd5a17a6e92fdca1bd6de9d9caf9/package.json#L18

ruscon commented 3 years ago

The only way that should happen is if your build step is messing up and including ./index.js instead of respecting the main entry point in the package.json:

https://github.com/TehShrike/deepmerge/blob/7640d50c9d9dcd5a17a6e92fdca1bd6de9d9caf9/package.json#L18

This can potentially happen when using esm

But I was unable to reproduce the bug. My steps were like this:

  1. npm i is-mergeable-object - after that everything worked
  2. npm uni is-mergeable-object - after that, it still worked :/