I am trying to publish a module to npm registry. Before publishing I tried npm link
command to install it as a local dependency.
Running the command started throwing errors similar to following.
WARN tar EISDIR: illegal operation on a directory, open '/[[path_to_project]]/node_modules/.staging/@babel/plugin-transform-exponentiation-operator-049e5354/lib'
npm WARN rm not removing /[[path_to_project]]/node_modules/.bin/semver as it wasn't installed by /[[path_to_project]]/node_modules/semver
test-pkg@1.0.0 requires a peer of react@16.7.0 but none is installed. You must install peer dependencies yourself.
npm WARN test-pkg@1.0.0 requires a peer of react-dom@16.7.0 but none is installed. You must install peer dependencies yourself. npm WARN test-pkg@1.0.0 No description
I spent hours trying to fix this but no luck yet. I went through this post and removed .npmrc but that did not fix the issue.