简体   繁体   English

npm 错误! 安装反应依赖项时编码 ENOSELF

[英]npm ERR! code ENOSELF while installing react dependencies

when I try to install dependencies using 'npm install react react-dom prop-types --save-dev' to the react (in webstorm) it shows an error 'npm ERR!当我尝试使用'npm install react react-dom prop-types --save-dev'安装依赖项到react(在webstorm中)时,它显示错误'npm ERR! code ENOSELF'.代码 ENOSELF'。

it did work correctly before so i tried 2 3 times creating new projects它之前确实工作正常,所以我尝试了 2 3 次创建新项目

npm install react react-dom prop-types --save-dev npm install react react-dom prop-types --save-dev

npm install react react-dom prop-types --save-dev should install all the dependencies but it shows an error npm install react react-dom prop-types --save-dev 应该安装所有依赖项,但显示错误

For this error,对于这个错误,

  1. make sure that the project name and package name should not be the same.确保项目名称和包名称不应相同。
  2. or just rename the package name property in my package.json in the branch...或者只是在我的 package.json 中重命名分支中的包名称属性...

rename your project directory to something else.... then execute below command将您的项目目录重命名为其他内容....然后执行以下命令

npm audit fix

or或者

npm audit fix --force 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装 React 时出现 NPM ERR - NPM ERR while installing React npm 错误! 代码 ENOSELF 并拒绝在包下安装名为“mermaid”的包 - npm ERR! code ENOSELF and Refusing to install package with name "mermaid" under a package NPM 错误:安装 react-router-dom 时出现“npm ERR!code ENOTEMPTY” - NPM error: "npm ERR! code ENOTEMPTY" when installing react-router-dom npm 错误! 安装代码 EINVALITDAGNAME package - npm ERR! code EINVALIDTAGNAME in installing a package npm 错误! 使用 React 时编码 ENOENT,npm ERR! enoent ENOENT: 没有那个文件或目录,打开'D:\\D\\web\\react\\practise - npm ERR! code ENOENT while using React,npm ERR! enoent ENOENT: no such file or directory, open 'D:\D\web\react\practise 反应 - 安装时不工作 npm - REACT - not working npm while installing it 安装 create-react-app 会出现 npm ERR。 shasum 检查失败和 npm ERR。 在“...mojOzGIEI2rg0m24Yb5Oq”附近解析时输入意外结束 JSON - Installing create-react-app gives npm ERR! shasum check failed and npm ERR! Unexpected end of JSON input while parsing near '...mojOzGIEI2rg0m24Yb5Oq' 为什么反应抛出 npm ERR? 代码生命周期? - Why is react throwing npm ERR! code ELIFECYCLE? 如何解决“npm ERR? 代码ELIFECYCLE”在反应? - How to solve “npm ERR! code ELIFECYCLE” in react? npm ERR 代码 ERESOLVE 在尝试安装 React 包时遇到此问题 - npm ERR code ERESOLVE facing this issue while trying to install react packages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM