简体   繁体   English

WARN tar EISDIR:对目录的非法操作

[英]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.

相关问题 EISDIR - EISDIR:对目录的非法操作,读取 - EISDIR - EISDIR: illegal operation on a directory, read fs 错误:EISDIR:对目录的非法操作,读取 - fs Error: EISDIR: illegal operation on a directory, read 纱线“错误:EISDIR:对目录的非法操作,读取” - yarn "Error: EISDIR: illegal operation on a directory, read" Bower安装:错误:EISDIR:对目录的非法操作,读取 - Bower install: Error: EISDIR: illegal operation on a directory, read Discord.js 错误:EISDIR:对目录的非法操作,请阅读 - Discord.js Error: EISDIR: illegal operation on a directory, read webpack模块节点产生错误EISDIR:对目录的非法操作 - webpack module node produces error EISDIR: illegal operation on a directory EISDIR:对目录进行非法操作,读取+ Nodemailer映像附件 - EISDIR: illegal operation on a directory, read + Nodemailer image attachment Firebase 云功能:错误:EISDIR:对目录的非法操作 - Firebase cloud function: Error: EISDIR: illegal operation on a directory Ember.js错误:EISDIR:目录上的非法操作 - Ember.js Error: EISDIR: illegal operation on a directory Node Js - EISDIR:对目录的非法操作,打开'tmp' - Node Js - EISDIR: illegal operation on a directory, open 'tmp'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM