I have a React app that has a dependency on another React component from a library that I created.
When I run the build script on the Parent, and the dependency is installed via npm install
, the dependency is not linted in the Parent App.
But when I run npm link
so I can develop the component locally, and have my Parent App run it's build script, it fails due to the fact it is linting the transpiled code of the dependency.
Any ideas why this is happening?
UPDATE
It seems to have something to do with the name of the directory where the final bundle ends up. I named it bin
. Reading through the npm docs it seems that npm link
creates a symlink for the directory of the module, as well as for the bin
directory, if there is one. I simply changed the name to dist
and it resolved the issue. Not the best answer, but hopefully it can help someone in my same situation.