0

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.

Community
  • 1
  • 1
It worked yesterday.
  • 4,507
  • 11
  • 46
  • 81

1 Answers1

0

Removing .npmrc, deleting and reinstalling node_modules did not work for me.

I solved this problem by setting --production flag as npm link --production" And also yarn link worked without any issue. Hope this helps if someone is having the same problem.

It worked yesterday.
  • 4,507
  • 11
  • 46
  • 81