[英]WARN tar EISDIR: illegal operation on a directory
I am trying to publish a module to npm registry. 我正在尝试将模块发布到npm注册表。 Before publishing I tried
npm link
command to install it as a local dependency. 发布之前,我尝试使用
npm link
命令将其安装为本地依赖项。
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'
警告tar EISDIR:对目录进行非法操作,打开'/[[[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
npm WARN rm不删除/[[path_to_project]]/node_modules/.bin/semver,因为/ [[path_to_project]] / node_modules / semver没有安装
test-pkg@1.0.0 requires a peer of react@16.7.0 but none is installed.
test-pkg@1.0.0需要对等体react@16.7.0,但未安装。 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.
npm WARN test-pkg@1.0.0需要对等体react-dom@16.7.0,但未安装。 You must install peer dependencies yourself.
您必须自己安装对等依赖项。 npm WARN test-pkg@1.0.0 No description
npm WARN test-pkg@1.0.0没有说明
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.
我浏览了这篇文章,并删除了.npmrc,但这没有解决问题。
Removing .npmrc
, deleting and reinstalling node_modules
did not work for me. 删除
.npmrc
,删除并重新安装node_modules
对我不起作用。
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. 我通过将--production标志设置为
npm link --production"
来解决此问题,并且yarn link
也没有任何问题。希望有人遇到同样的问题时,这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.